Skip to content
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

adjacent_res_smarts requires more atoms in adjacent_mol than capping residues (NME, ACE, phosphate) can provide #180

Closed
rwxayheee opened this issue Sep 29, 2024 · 1 comment
Assignees
Milestone

Comments

@rwxayheee
Copy link
Contributor

rwxayheee commented Sep 29, 2024

Hi, I was trying to register a phosphate capping group (similar to NME, ACE in proteins) as a new chem template. Just realized that this can be reproduced by protein examples.

To reproduce -
Protein structure 2G5Z is a green fluorescent protein (GFP) variant. Chain A is part of the beta-barrel and finishes with NME.

As the input, a stripped PDB file for chain A:
2g5z_A.pdb.txt

Command:

mk_prepare_receptor.py --macromol 2g5z_A.pdb --skip_gpf -o 2g5z

Output:

Traceback (most recent call last):
  File "/Users/amyhe/micromamba/envs/mk_dev/bin/mk_prepare_receptor.py", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/Users/amyhe/Desktop/0_forks/Meeko/scripts/mk_prepare_receptor.py", line 424, in <module>
    chorizo = LinkedRDKitChorizo.from_prody(
  File "/Users/amyhe/Desktop/0_forks/Meeko/meeko/linked_rdkit_chorizo.py", line 798, in from_prody
    chorizo = cls(
  File "/Users/amyhe/Desktop/0_forks/Meeko/meeko/linked_rdkit_chorizo.py", line 699, in __init__
    padded_mols = self._build_padded_mols(self.residues, bonds, padders)
  File "/Users/amyhe/Desktop/0_forks/Meeko/meeko/linked_rdkit_chorizo.py", line 1253, in _build_padded_mols
    padded_mol, mapidx = padders[link_label](
  File "/Users/amyhe/Desktop/0_forks/Meeko/meeko/linked_rdkit_chorizo.py", line 1990, in __call__
    raise RuntimeError(
RuntimeError: length of hits must be 1, but it's 0

I think the error occurred when it's trying to add the "5-term" padding to the normal residue that's adjacent to NME, when trying to find expected adjacent_res_smarts O=C[C:11][N:12] from its adjacent_mol that is NME.

Is it safe to make adjacent_res_smarts shorter? Or do we always check atoms in 1-4 range? If adjacent_res_smarts can't be shortened, then the capping groups might need to be handled differently.

The quickest walkaround would be to un-register the capping residues from chem templates.

@rwxayheee rwxayheee self-assigned this Sep 29, 2024
@diogomart diogomart added this to the v0.6.0 milestone Oct 1, 2024
rwxayheee added a commit that referenced this issue Oct 8, 2024
Fixing NME in #180 by fallback logics instead of additional information from chem template
@rwxayheee
Copy link
Contributor Author

closing becuase #185 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants