marrink-lab / vermouth-martinize

Describe and apply transformation on molecular structures and topologies
Apache License 2.0
89 stars 40 forks source link

keep resids of proteins if different or chains different #399

Closed fgrunewald closed 2 years ago

fgrunewald commented 2 years ago

This is a draft fix for issue #366 . Basically if the -protres flag is given the merge molecule will only compute a residue offset if any of the resids overlap and any of the chain identifiers overlap. In this way you just keep residue offsets in the same chain if there is no overlap and you also keep resids of different chains in the same molecule. This is the expected behavior for most PDBs and proteins.

Code wise this branch needs some improvements. But I think it makes sense to have a flag with merge molecule that dictates protein behaviour, because it is quite specific to proteins. Also I was thinking to API wise if it would make sense to maybe have generic criteria for how to merge molecules.

fgrunewald commented 2 years ago

a better PR is on the way