GeometryOptimization.jl

Geometry optimization for molecular simulation
Author JuliaMolSim
Popularity
6 Stars
Updated Last
3 Months Ago
Started In
September 2023

GeometryOptimization

Stable Dev Build Status Coverage

A package for optimising the structural parameters of an atomistic system, i.e. the step usually referred to as geometry optimisation or structural relaxation in electronic structure theory and atomistic modelling.

The package is generic in the datastructures used to represent the geometry, the calculator used to evaluate energies and forces as well as the solver algorithm. Generally all AtomsBase structures and AtomsCalculator calculators should work out of the box.

See the documentation for examples and further details.

Motivating example

We consider the optimisation of the bondlength of a hydrogen molecule using a simple Lennard Jones potential:

using AtomsBase
using EmpiricalPotentials
using GeometryOptimization
using Unitful
using UnitfulAtomic

# Setup system and calculator
system = isolated_system([:H => [0, 0, 0.0]u"bohr",
                          :H => [0, 0, 1.9]u"bohr"])
calc = LennardJones(-1.17u"hartree", 0.743u"angstrom", 1, 1, 0.6u"nm")

# Run the geometry optimisation
results = minimize_energy!(system, calc)

# Inspect the results
optimised  = results.system
bondlength = norm(position(optimised[1]) - position(optimised[2]))