Open nitroamos opened 5 years ago
@peastman: Should this be reviewed and merged?
Just to add that I am running into a similar issue and a patch like this could be potentially very useful. In my situtation, PDBFixer cannot add caps to the middle of a structure (in case it has gaps, this is sometimes useful before dynamics).
I cannot say this is a perfect solution, would need more time to check it thoroughly, but just adding my 2 cents that this is an important issue.
Sorry I've been so bad about replying to this. I kept meaning to reply but not doing it, and then I was traveling, and then I was on vacation. Sorry!
Anyway, I agree with you. This is an important issue, but I'm not convinced this is exactly the right solution. Could you open an issue describing exactly what you see as the important issues and requirements? Let's discuss what is the best way of solving it.
Some of my changes are related to this where I want to be able to specify the missing residues using
REMARK 465
sections. For now, I createchainWithGapsOverride
in my own software (an old version is in issue #170) because it's quite complex and because I'm not sure if/how PDBFixer/OpenMM could/should extract and save theREMARK 465
section from the original pdb.I did make one change to
chainWithGaps
corresponding to the situation where there are waters following the sequence -- their presence was preventing the "alignment" step infindMissingResidues
from working. I obviously don't have a list of all possible ligands and I don't want to examine CONECT records, but the approach of "known" residues seems ok to me.This addresses an unreported issue of insertionCodes for not-missing residues are not preserved.
One problem I've not taken on is that
REMARK 465
's specified resnum and insertion code are not necessarily preserved by_addMissingResiduesToChain
. Seems minor and I don't have any tests cases for that right now.This also addresses #175