-
Notifications
You must be signed in to change notification settings - Fork 116
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
best way to insert ACE/NME caps? #173
Comments
Could you clarify exactly what the unwanted behavior is? Is it just that it does an energy minimization that modifies the positions of all hydrogens, including ones that already existed? Or is the problem that it's actually adding more hydrogens to residues you don't want? If it's the former, a simple and reasonable possibility would be to change the behavior of |
I would definitely not want it to change the protonation state of residues that already have hydrogens, but I didn't investigate if that's happening or not. Maybe that's implied by your proposal, which sounds great to me. |
That's my question: which problem are you encountering? That it's adding hydrogens you don't want, or that it's changing the positions of existing hydrogens? |
I wrote some sample code like this:
and here's the output:
This pdb had hydrogens in the starting structure. Here are the undesirable things I'm seeing:
In my thinking, the ideal approach would be to only add hydrogens to residues that don't have any hydrogens: i.e., either adds all hydrogens or adds none. If the user wants to change the pH, then you could offer to remove all hydrogens first. |
What do you mean by residue assignment? |
Residues which were initially assigned to be HIE or HID are becoming HIP. |
It only does that when you specify pH 0. On each of the first four calls, the assignments remain fixed. But on the fifth call it changes them all to HIP, because that's the correct variant for them to be at pH 0. Is that not what you were expecting? Also see the API documentation, especially the following paragraph which is relevant:
|
Ah, OpenMM's behavior for automatically selected variants is intentional then -- not a bug. Sorry, I could have found and read that doc myself. 😊 To get the behavior I want, it looks like I could bypass PDBFixer to use the |
Correct.
Residue names don't depend on the variant. They remain the same regardless of protonation state. Or do you mean determine the variant names based on which hydrogens are currently present? There's no routine specifically for that, though the logic is pretty simple. |
Ok, here's a code snippet. I believe this should be included in p.s., I noticed that
|
Oops! Thanks for pointing that out. |
Should
I would think default from pdb2pqr would be this from their docs EDIT: I removed all hydrogens and ran again and it looks like pdbfixer at ph=7 defaults to having the HID protonation state having |
I believe the Maestro prep wizard places the proton on whichever nitrogen better satisfies hydrogen bonds. From here: |
Thanks for the resource @jchodera! I would def agree with whatever Schrodinger does 😄. Looks like most of the time at physiological pH it's going to try to make as many hydrogen-bond donors as possible. I just tested all the players on one PDB and Tinker |
I've got code that does something like this:
where my
displayMissingResidues
has a section that looks like this:this seems to work pretty well except that when I call
addMissingHydrogens
to add hydrogens to my new ACE and NME residues it's changing/minimizing all my previously placed hydrogens. This is a bit of chicken-and-egg for my default workflow which looks partially like this:That is, I want to do add ACE/NME after I've placed hydrogens. One approach could be to grab code from modeler.addHydrogens and add the hydrogens to the topology myself. However, there are other more elegant approaches if you were willing to implement them:
addHydrogens
in OpenMM could have a more conservative mode and only add hydrogens to residues which don't have any (exposing an appropriate kw in PDBFixer'saddMissingAtoms
)heavyAtomsOnly
option in _addAtomsToTopology toaddMissingAtoms
.Any suggestions?
As an aside, I'm not sure if
residues = ["NME","ACE"]
is valid for OpenMM because there's a chain break implied by that sequence. This approach is ok for me in PDBFixer because it seems like it can save the PDB ok.Another aside, I'll comment here about my
getChainWithGapsFromRemark465
when I've tested it better.The text was updated successfully, but these errors were encountered: