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

Error when trying to read in phosphorylated threonine #246

Closed
hannahbaumann opened this issue Nov 2, 2023 · 3 comments
Closed

Error when trying to read in phosphorylated threonine #246

hannahbaumann opened this issue Nov 2, 2023 · 3 comments

Comments

@hannahbaumann
Copy link
Contributor

hannahbaumann commented Nov 2, 2023

The CDK2 protein (from the PLB) has a phosphorylated threonine and when I try and read it in I'm getting this error:

protein = openfe.ProteinComponent.from_pdb_file("../01_protein/crd/protein.pdb")

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In[4], line 1
----> 1 protein = openfe.ProteinComponent.from_pdb_file("../01_protein/crd/protein.pdb")

File ~/gufe/gufe/components/proteincomponent.py:106, in ProteinComponent.from_pdb_file(cls, pdb_file, name)
     90 """
     91 Create ``ProteinComponent`` from PDB-formatted file.
     92 
   (...)
    103     the deserialized molecule
    104 """
    105 openmm_PDBFile = PDBFile(pdb_file)
--> 106 return cls._from_openmmPDBFile(
    107     openmm_PDBFile=openmm_PDBFile, name=name
    108 )

File ~/gufe/gufe/components/proteincomponent.py:219, in ProteinComponent._from_openmmPDBFile(cls, openmm_PDBFile, name)
    217         resn = a.GetMonomerInfo().GetResidueName()
    218         resind = int(a.GetMonomerInfo().GetResidueNumber())
--> 219         raise ValueError(
    220             "I don't know this Ion or something really went "
    221             f"wrong! \t{atom_name}\t{resn}\t-{resind}\t"
    222             f"connectivity{connectivity}"
    223         )
    224 elif default_valence > connectivity:
    225     fc = - (default_valence - connectivity)  # negative charge

ValueError: I don't know this Ion or something really went wrong! 	N	TPO	-160	connectivity0

Is there a way to fix this?

Here is the input
https://github.com/openforcefield/protein-ligand-benchmark/blob/main/data/cdk2/01_protein/crd/protein.pdb

@richardjgowers
Copy link
Contributor

@richardjgowers
Copy link
Contributor

So pdbinf will give you a rdkit.Mol then you'll make the gufe.ProteinComponent from that. Isn't an option from the cli yet, it would need #135

@hannahbaumann
Copy link
Contributor Author

Awesome, yes that worked!

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