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
Perceive external bonds (necessary for glycam ffxml conversion) #1184
Conversation
This change looks like it's very specific to GLYCAM. We should make sure it doesn't break other force fields. For example, if you run CHARMM36 through it, does this cause it to start inserting external bonds that shouldn't be there? Possibly this could be controlled by a global option, so you need to specifically enable it when running ParmEd. |
The tests were failing for this because the function I wrote only allows for external bond perception for elements C, H, N, and O -- any other atom types will throw an error. I've checked the glycam ffxml to see if any residues contain S or P and only residue SO3 contains S (no residues contain P). I've included 'SO3' as a special case in the function. To make sure my fix doesn't affect other conversion of other forcefields, I've also implemeted Peter's suggestion of using a global flag to control whether the external bond perception code is executed. |
I'm not a maintainer. @swails will have to do it. |
@peastman and I have been working on converting the AMBER glycam forcefield (
GLYCAM_06j-1
) into a ffxml for the OpenMM ecosystem -- we have the conversion pipeline working now (after making a number of changes to Parmed, OpenMM, and soon Openmmforcefields), but there is one more ParmEd fix that I had to use for the conversion pipeline that has not been pushed.After generating the ffxml and upon trying to create a system for a glycosylated protein, I was getting errors like :
This was because the ExternalBonds in the ff templates were not correct. In the converted ffxml, for the UYB residue, I was seeing:
But there should be a third line for atomName="O6".
Since Parmed was not writing out all of the atoms with external bonds correctly, I added a fix to
parmed/openmm/parameters.py
. This fix involves adding a function called_get_atoms_with_external_bonds()
that gets atoms with external bonds.Not sure if this fix should be merged into master as I'm not sure whether it will disrupt the current functionality of
parmed/openmm/parameters.py
, but this is necessary for glycam ffxml conversion, so we should brainstorm how to include it in the repo.Tagging @jchodera @peastman @swails for feedback