# What's a quick way to get a molecular bond length using a Newtonian model?

Can anyone spare me a clue on this?

I'm a self-taught student of Molecular Geometry trying to learn more about methods in modeling. After some extensive reading and study, it felt like it should be easy enough to find an open-source modeling framework with an out-of-the-box force field to just run a basic newtonian model to find a minimum energy state that'd tell you the distance between, say, two Oxygen atoms in O2 or two Hydrogen atoms in H2.

I'm using Atomic Simulation Environment in Python and their EMT() force-field/calculator plus the BFGS optimizer, but am getting terrible results. Simulations repeatedly reporting the interatomic distance between O and O at 1.56 when the real distance is around 1.21

I've gotten decent results on interatomic distances for H2O using EMT() [despite its limits], but these diatomic molecules remain a challenge.

Here's a code snippet:

o2 = molecule('O2', vacuum=3.0)
o2.calc = EMT()

dyn = BFGS(o2)
dyn.run(fmax=0.025)

write('O2.xyz', o2)
distVecs = o2.get_all_distances()
r = np.linalg.norm(distVecs[0]-distVecs[1])
print("Distance between molecules is %.2f" % r)
print("          ---> Target for O2: %.2f" % 1.208)


Which gives me results like:

      Step     Time          Energy         fmax
BFGS:    0 14:43:25        0.922681        3.7034
BFGS:    1 14:43:25        0.650383        1.2520
BFGS:    2 14:43:25        0.628230        0.4958
BFGS:    3 14:43:25        0.624772        0.0393
BFGS:    4 14:43:25        0.624750        0.0011
Distance between molecules is 1.56
---> Target for O2: 1.21


The quality of force fields depends a lot on the parameters.

For example, if I use Avogadro and draw out O=O and optimize using the default (MMFF94) I get an O-O distance of 1.282 Å. If I optimize using UFF, I get an O-O distance of 1.151 Å.

Instead, if I use the GFN2 approximate DFT method, I get an O-O distance of 1.21 Å.

If you look at the EMT documentation from ASE, it says:

The EMT parameters for the metals are quite realistic for many purposes, whereas the H, C, N and O parameters are just for fun!

• Wow! As a beginner I had no idea Avogadro even existed. Great suggestion, thank you so much. Worked the first time and all without a line of code. Thanks for your helpful response.
– krowney
Jun 9, 2022 at 4:35
• @krowney Please don't post a "thank you" as a comment. Instead, upvote or accept answers that were useful to you. Jun 9, 2022 at 9:23