Re: [Open Babel] How can I keep atom labels in the output PDB

2021-02-25 Thread Henrique M. Cezar
Dear Qianzhen, To to map the atom id to the labels you should iterate over the PDB's residues, like: idToAtomicLabel = {} for res in openbabel.OBResidueIter(mol): for atom in openbabel.OBResidueAtomIter(res): idToAtomicLabel[atom.GetId()] = res.GetAtomID(atom).strip() Best,

[Open Babel] How can I keep atom labels in the output PDB

2021-02-25 Thread 邵乾真
Dear Open Babel support team, I tried to protonate a ligand from a PDB file and save a protonated PDB that keeps the atom label (e.g.: C2A) and residue name. The PDB openbabel exported just leaves element type (e.g.: C) but not the original atom label (e.g.: C2A). And the residue name was changed