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.
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.