openmm / pdbfixer

PDBFixer fixes problems in PDB files
Other
461 stars 115 forks source link

Insertion codes not preserved in addMissingAtoms #187

Closed zhang-ivy closed 4 years ago

zhang-ivy commented 4 years ago

This issue is related to @peastman 's fix: https://github.com/pandegroup/pdbfixer/pull/184

While findMissingResidues can now handle PDBs with residue insertion codes, in addMissingAtoms (which calls _addAtomsToTopology), the new topology with the missing atoms added does not maintain residue insertion codes.

This should be a simple fix: change this line newResidue = newTopology.addResidue(residue.name, newChain, residue.id) (https://github.com/pandegroup/pdbfixer/blob/master/pdbfixer/pdbfixer.py#L401) to newResidue = newTopology.addResidue(residue.name, newChain, residue.id, residue.insertionCode)

peastman commented 4 years ago

A PR would be welcome!

zhang-ivy commented 4 years ago

Sorry for the delay, I'm trying to create the PR now, but I get the following error when I try to push to my newly created insertion-codes branch:

fatal: unable to access 'https://github.com/pandegroup/pdbfixer.git/': The requested URL returned error: 403

Can you add me as a contributor to this repo?

jchodera commented 4 years ago

@ivyzhang999 : You should be able to create your own fork of the repo and then contribute the PO from your fork!

We typically don't do that for projects that involve encrypted environment variables because travis does not encrypt them in PRs from forks for security reasons, but that isn't an issue here!