Obminimize stop criteria

Dear all,

I am having some troubles in get some (supposedly straightforward) relaxations results.

I want to relax a benzene molecule in xyz format (this is a test for more complex results).

I tried both “obminimize” and “obabel --minimize”, compiling the source code and the anaconda3 version.

In all cases I do get a different geometry with lower energy, but I can neither get the code to stop when the criteria is reached nor obtain a convergence message whatsoever.

$ obabel benzene.xyz -O min_benzene.xyz --minimize --steps 500 --sd --ff UFF --log --crit 1e-4

–crit 1e0 gives the same result, log_001.txt

$ obminimize benzene.xyz -O min_benzene.xyz --steps 500 --sd --ff UFF --crit 1e-4

In addition, In the obminimize case, I get an error message, zero charges and alternate +/- 0.15 partial charges, as shown below.

‘’’

*** Open Babel Warning in ReadMolecule

Problems reading an XYZ file: Cannot read the first line.

‘’’

IDX CHARGE

1 0.000000

12 0.000000

P A R T I A L C H A R G E S

IDX CHARGE

1 -0.150000

2 0.150000

Could anyone explain what am I doing wrong?

Thank you

Marco

(Attachment benzene.txt is missing)

(Attachment log_001.txt is missing)

I’m a bit confused - this is a forum for Avogadro.

While we use Open Babel’s force field implementation, the stop criteria in Avogadro are controlled by the user.

Yeah, I am also confused on this point.

I’ll make one step behind: I need to use Avogadro in a scripting fashion, either in a shell or python script. Is there a way proper to Avogadro to do this?

I have followed the hint of using babel instead: https://sourceforge.net/p/avogadro/mailman/message/35187667/

Thank you
Marco

Do you need this for the force field / optimization bits? If so, use Open Babel.

If you want to script other aspects of Avogadro, some things are scriptable in Python, particularly in Avogadro v2, but it would depend on your needs.

I want to relax with UFF a large amount of molecules.
Using avogadro in python (or shell) would be the best
Thank you

It’s fairly easy to use obabel from the command line:
https://open-babel.readthedocs.io/en/latest/Command-line_tools/babel.html#forcefield-energy-and-minimization

Yes, this was the starting point of this thread…
How can I make obabel to stop when the --crit option is met?

If it’s not obeying the gradient criteria, you likely have an old version of obabel - there was a patch that went into 3.0 fixing that bug.