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

Bug in molecule.py for protonated molecules with positive formal charge #100

Open
Mino01 opened this issue Jul 30, 2022 · 0 comments
Open

Comments

@Mino01
Copy link

Mino01 commented Jul 30, 2022

Expected behavior
The code was expected to work for a +1 formal charge molecule
The IUPAC name of the molecule is (1S,3S)-3,5,12-trihydroxy-3-(hydroxyacetyl)-10-methoxy-6,11-dioxo-1,2,3,4,6,11-hexahydrotetracen-1-yl 3-azaniumyl-2,3,6-trideoxy-alpha-L-lyxo-hexopyranoside.

Canonical SMILES: "O[C@@H]1[C@@H](O[C@H](C[C@@H]1[NH3])O[C@H]1C[C@](O)(C(=O)CO)Cc2c(O)c3c(c(c12)O)C(=O)c1c(C3=O)cccc1OC)C"

Actual behavior
There is a bug in molecule.py for a protonated molecule with +1 formal charge
....

mol = psiresp.Molecule.from_smiles("O[C@@H]1[C@@H](O[C@H](C[C@@H]1[NH3])O[C@H]1C[C@](O)(C(=O)CO)Cc2c(O)c3c(c(c12)O)C(=O)c1c(C3=O)cccc1OC)C", optimize_geometry=True)
File "/ceph/hpc/home/eumartino/.local/lib/python3.9/site-packages/psiresp/molecule.py", line 113, in from_smiles
  rdmol = rdutils.rdmol_from_smiles(smiles, order_by_map_number=order_by_map_number)
File "/ceph/hpc/home/eumartino/.local/lib/python3.9/site-packages/psiresp/rdutils.py", line 38, in rdmol_from_smiles
  rdmol = Chem.AddHs(Chem.MolFromSmiles(smiles, smiles_parser))
Boost.Python.ArgumentError: Python argument types in
  rdkit.Chem.rdmolops.AddHs(NoneType)
did not match C++ signature:
  AddHs(RDKit::ROMol mol, bool explicitOnly=False, bool addCoords=False, boost::python::api::object onlyOnAtoms=None, bool addResidueInfo=False)
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

1 participant