Skip to content

Conversation

@k-ujihara
Copy link

@k-ujihara k-ujihara commented Dec 2, 2025

The Cl atom is incorrectly converted to C by "pmx atomMapping" due to a misimplementation in the writeFormatPDB method.
As a result, the script below should output two "CCl", but it outputs two "CC" instead. Br atom also has the same problem.
This PR fixes the issue.

python -c "from rdkit.Chem.AllChem import *; m = MolFromSmiles('ClC'); EmbedMolecule(m); MolToPDBFile(m, 'm1.pdb')"
python -c "from rdkit.Chem.AllChem import *; m = MolFromSmiles('ClC'); EmbedMolecule(m); MolToPDBFile(m, 'm2.pdb')"
pmx atomMapping -i1 m1.pdb -i2 m2.pdb -opdb1 pdb1.pdb -opdb2 pdb2.pdb
python -c "from rdkit.Chem.AllChem import *; m = MolFromPDBFile('pdb1.pdb'); print(MolToSmiles(m));"
python -c "from rdkit.Chem.AllChem import *; m = MolFromPDBFile('pdb2.pdb'); print(MolToSmiles(m));"

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

Successfully merging this pull request may close these issues.

1 participant