tbereau / auto_martini

Automatic MARTINI parametrization of small organic molecules
GNU General Public License v2.0
59 stars 22 forks source link

raise Exception("Problem in smi2alogps %s" % smiFrag) Exception: Problem in smi2alogps [H]S(=O)=O #10

Closed SheenSun closed 7 years ago

SheenSun commented 7 years ago

Dear Dr. Tristan_Bereau,

Hello!

I am using _automartini to coarse grain a drug, namely, glipizide. Since this molecule has 31 heavy atoms, I cut it into two segements, as can be seen in the following figure. For segment-2, the script works very well, but for segment-1, which contains [H]S(=O)=O group, I got the error messege.

image

(my-rdkit-env) root@liang-ThinkPad-Edge-E440:~/SD/cut-gli# auto_martini --sdf part1-gli.sdf --mol 1 --gro 1.gro Traceback (most recent call last): File "/opt/auto_martini-master/auto_martini", line 1226, in <module> ringAtomsFlat, True) File "/opt/auto_martini-master/auto_martini", line 857, in printAtoms raise Exception("Problem in smi2alogps %s" % smiFrag) Exception: Problem in smi2alogps [H]S(=O)=O

I just delete the [H]S(=O)=O group on segment-1 and try to coarse grain the rest part, it works well, so I think it is this [H]S(=O)=O group cause the error.

I also convert the sdf format to smi format by babel. I get the following error.

(my-rdkit-env) root@liang-ThinkPad-Edge-E440:~/SD/cut-gli# babel -i sdf part1-gli.sdf -o smi part1-gli.smi 1 molecule converted 15 audit log messages (my-rdkit-env) root@liang-ThinkPad-Edge-E440:~/SD/cut-gli# auto_martini --smi part1-gli.smi --mol 1 --gro 1.gro [00:34:53] SMILES Parse Error: syntax error for input: 'part1-gli.smi' Traceback (most recent call last): File "/opt/auto_martini-master/auto_martini", line 524, in <module> mol = genMoleculeSMI(args.smi) File "/opt/auto_martini-master/auto_martini", line 93, in genMoleculeSMI mol = Chem.AddHs(mol) 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)

Is there any ways to solve this problem?

best, Liang

tbereau commented 7 years ago

Dear Liang,

The alogps prediction algorithm might not support this chemical fragment. You can try parametrizing the molecule using the --fpred option. This will rely on an atom-based logP prediction. You might still want to test your molecule afterwards if you have some reference data (exp or atomistic simulations).

Best, Tristan

SheenSun commented 7 years ago

Dear Dr. Tristan Bereau,

Thanks for the kind suggestions. I will try it.

Best, Liang