-
Notifications
You must be signed in to change notification settings - Fork 54
Add docs on how to add templates for 9MXW #355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
To add new padders, a small fix in #338 (e8d734b) is needed. Please consider this API example: from meeko import Polymer, ResidueChemTemplates, MoleculePreparation
mk_prep = MoleculePreparation()
residue_chem_templates = ResidueChemTemplates.create_from_defaults()
# Update ambiguous residue templates
residue_chem_templates.ambiguous["LYS"].append("LYSiso") # to preserve order of existing templates
residue_chem_templates.ambiguous["ASN"].append("ASNiso")
# Add padders and templates
residue_chem_templates.add_dict({
"padders": {
"LYSiso-N-term": {
"rxn_smarts": "[C:1]([C:7](=[O:8])[N:9])[C:2][C:3][C:4][C:5][N:6]>>[C:1]([C:7](=[O:8])[N:9])[C:2][C:3][C:4][C:5][N:6][C:11](=[O:12])[C:13]",
"adjacent_res_smarts": "[C:11](=[O:12])[C:13][N]",
"auto_blunt": False
},
"ASNiso-C-term": {
"rxn_smarts": "[C:1]([C:7](=[O:8])[N:9])[C:2][C:3](=[O:4])>>[C:1]([C:7](=[O:8])[N:9])[C:2][C:3](=[O:4])[C:5][N:6]",
"adjacent_res_smarts": "[C](=O)[C:5][N:6]",
"auto_blunt": False
},
},
"residue_templates":{
"LYSiso": {
"smiles": "C(=O)C([H])(N[H])C([H])([H])C([H])([H])C([H])([H])C([H])([H])N[H]",
"atom_name": ["C", "O", "CA", "HA", "N", "H", "CB", "HB3", "HB2", "CG", "HG2", "HG3", "CD", "HD2", "HD3", "CE", "HE2", "HE3", "NZ", "HZ1"],
"link_labels": {"0": "C-term", "4": "N-term", "18": "LYSiso-N-term"}
},
"ASNiso": {
"smiles": "C(=O)C([H])(N[H])C([H])([H])C(=O)",
"atom_name": ["C", "O", "CA", "HA", "N", "H", "CB", "HB2", "HB3", "CG", "OD1"],
"link_labels": {"0": "C-term", "4": "N-term", "9": "ASNiso-C-term"}
}
}
})
# Input file
input_file = "9MXW.pdb"
with open(input_file, "r") as f:
pdb_string = f.read()
# Construct the polymer object
polymer = Polymer.from_pdb_string(
pdb_string,
residue_chem_templates,
mk_prep,
default_altloc="A")
assert isinstance(polymer, Polymer), "Polymer object not created correctly" |
Note: In theory it's possible to reuse the "N-term" and "C-term" padders. However, the current "react_and_map" doesn't have a range to look for the reactant patterns so reusing "N-term" and "C-term" lead to incorrect products. Therefore, to define isopeptide linkage like this example, the reaction smarts needs to be as specific as possible. I can prepare a new post in the documentation with this example as an additional tutorial. But this can wait until the needed PR is merged and other related updates. The API example is provided for future reference. |
No description provided.
The text was updated successfully, but these errors were encountered: