tbereau / auto_martini

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

Problems with nitriles #4

Open SGenheden opened 8 years ago

SGenheden commented 8 years ago

Having trouble parameterising some molecules with a nitrile group. With a simple benzonitrile:

auto_martini --smi "c1ccc(cc1)C#N" --mol bni

I get the following error message

Traceback (most recent call last):
  File "/Users/samuel/Documents/Programs/auto_martini/auto_martini", line 1203, in <module>
    ringAtomsFlat, True)
ValueError: need more than 0 values to unpack
tbereau commented 8 years ago

Try running from the refactor branch

git checkout refactor

the executable is slightly different:

python auto_martini.py --smi "c1ccc(cc1)C#N" --mol bni

You'll notice that if fails:

WARNING:main:ALOGPS can't predict fragment: N#Cc1[c][c][c][c][c]1

looks like the prediction algorithm wasn't trained against cyanide. You can always fall back on the atom-based Wildman-Crippen prediction algorithm (--fpred):

python auto_martini.py --smi "c1ccc(cc1)C#N" --mol bni --fpred --aa bni_aa.gro --cg bni_cg.gro

which works on my end. However, you might want to check that the bead type assigned to the cyanide group is correct (the Wildman-Crippen isn't as good a prediction algorithm as alogps).

Cheers, Tristan

SGenheden commented 8 years ago

The --fpred argument worked fine. Thanks, Sam