pdbfixer
pdbfixer copied to clipboard
PDBFixer is changing chain names
hello,
PDBfixer in my case is changing chain names and re-indexing them to alphabet order
initial chains are : {'O', 'F', 'D', 'P'} fixed PDB chains are : {'A', 'B', 'C', 'D'}
fixer = PDBFixer(filename="my_structure.pdb") fixer.findMissingResidues() fixer.findNonstandardResidues() fixer.replaceNonstandardResidues() fixer.findMissingAtoms() fixer.addMissingAtoms() PDBFile.writeFile(fixer.topology, fixer.positions, open("my_fixed_structure.pdb", 'w'))
my structure : https://www.filemail.com/d/rrqrxvfuhrgxkdp
In the call to writeFile()
, add the argument keepIds=True
. See the API documentation at http://docs.openmm.org/latest/api-python/generated/openmm.app.pdbfile.PDBFile.html#openmm.app.pdbfile.PDBFile.writeFile, especially the warning about that argument.