Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDBFixer is changing chain names #230

Closed
raoufkeskes opened this issue Sep 22, 2021 · 1 comment
Closed

PDBFixer is changing chain names #230

raoufkeskes opened this issue Sep 22, 2021 · 1 comment

Comments

@raoufkeskes
Copy link

raoufkeskes commented Sep 22, 2021

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

@peastman
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants