Semi-official documentation of the PDB+SDF stack API route
The content of this page was edited by matteoferla on the 2023-01-11 10:09:03.937063.The administrators of this site take no legal responsibility for the content of this page, if you believe this page is in violation of the law, please report it.
Route description
This is my protein, it is a dimer of one chain, plus another. In its active site, it can bind one molecule or another one.
convert_pdb_w_sdf
In addition to the convert_pdb
route, now there is a convert_pdb_w_sdf
route.
This route accepts (POST/GET) a files payload, where one file with key apo
is the apo PDB, while all the rest are the ligands. The ligand name will be used as the name visible to the editing user in the GUI of the Michelanglo page.
The json reply ought to be a dictionary with key page
and value the uuid to the new page. Say.
One ligand name that is not allowed is viewcode
. The viewcode
option like in convert_pdb
is not actually wired correctly.
payload ={'apo': open('/home/matteo/Desktop/NUDT5A-x0114_1.pdb'),
'psychotic acid': open('/home/matteo/Desktop/NUDT5A-x0114_1.sdf'),
'flatuentiol': open('/home/matteo/Desktop/NUDT5A-x0114_2.sdf')}
reply = requests.post('https://michelanglo.sgc.ox.ac.uk/convert_pdb_w_sdf', files=payload).json()
As is visible from the output the label of psychotic acid
is psychotic_acid (space > underscore). This is a minor annoyance I need to address for Michelanglo in general.
Reason
If one want to make a PDB page one uses the convert_pdb
. If one wants to add multiple PDBs to a page one merges multiple pages. This is all fun and games until the page made has over a dozen 2MB structures all with the same peptide backbone and the internet grinds to a halt. Consequently, the page contains the peptide apo
and a bunch of ligands and assembles them client-side.
Mechanism notes
Behind the scenes, the pdb gets 'purified' against XSS attacks and the the sdf get converted to PDB blocks, but with atoms starting after the last one of the pdb file. The chain will be 'Z'.
In the clientside browser the following will be polluting window
: ligands
, generate_ligands()
and variables corresponding to ligand names which contain the assembled PDB block that is loaded with data-load="xxx"
.
The slots of the ligands are pre-allocated so it plays well with merge and mutagenesis etc.
Observations
- The starting orientation is GUI made in
convert_pdb
. I could make an intermediate page like /pdb. - The ligand name is
UNK
. This is annoying. I assume that a 3 letter code does not exist for this guy.LIG
is dangerous elsewhere as it is unfortunately a ligand in the PDB. I could use that. - The default representation of
hyperball
cannot show doublebonds. Maybe a custom thicclicorice
would be better.
peptide and nucleic acid chains
These are the models in this page. To make your own prolinks, do note that the ligand is called "UNK" for selection purposes.
- Apo structure
- Ligand: psychotic_acid
- Ligand: flatuentiol