|
3 | 3 | [](https://JuliaMolSim.github.io/GeometryOptimization.jl/stable/) |
4 | 4 | [](https://JuliaMolSim.github.io/GeometryOptimization.jl/dev/) |
5 | 5 | [](https://github.com/JuliaMolSim/GeometryOptimization.jl/actions/workflows/CI.yml?query=branch%3Amain) |
| 6 | +[](https://codecov.io/gh/JuliaMolSim/GeometryOptimization.jl) |
6 | 7 |
|
7 | | -A geometry optimization package for |
| 8 | +A package for optimising the structural parameters of an atomistic system, |
| 9 | +i.e. the step usually referred to as |
| 10 | +**geometry optimisation** or **structural relaxation** |
| 11 | +in electronic structure theory and atomistic modelling. |
| 12 | + |
| 13 | +The package is generic in the datastructures used to represent the geometry, |
| 14 | +the calculator used to evaluate energies and forces as well as the solver algorithm. |
| 15 | +Generally all |
8 | 16 | [AtomsBase structures](https://github.com/JuliaMolSim/AtomsBase.jl) |
9 | | -and [AtomsCalculator calculators](https://github.com/JuliaMolSim/AtomsCalculators.jl). |
| 17 | +and [AtomsCalculator calculators](https://github.com/JuliaMolSim/AtomsCalculators.jl) |
| 18 | +should work out of the box. |
| 19 | + |
10 | 20 | See the [documentation](https://JuliaMolSim.github.io/GeometryOptimization.jl/stable/) |
11 | 21 | for examples and further details. |
| 22 | + |
| 23 | +## Motivating example |
| 24 | + |
| 25 | +We consider the optimisation of the bondlength of a hydrogen |
| 26 | +molecule using a simple Lennard Jones potential: |
| 27 | + |
| 28 | +```julia |
| 29 | +using AtomsBase |
| 30 | +using EmpiricalPotentials |
| 31 | +using GeometryOptimization |
| 32 | +using Unitful |
| 33 | +using UnitfulAtomic |
| 34 | + |
| 35 | +# Setup system and calculator |
| 36 | +system = isolated_system([:H => [0, 0, 0.0]u"bohr", |
| 37 | + :H => [0, 0, 1.9]u"bohr"]) |
| 38 | +calc = LennardJones(-1.17u"hartree", 0.743u"angstrom", 1, 1, 0.6u"nm") |
| 39 | + |
| 40 | +# Run the geometry optimisation |
| 41 | +results = minimize_energy!(system, calc) |
| 42 | + |
| 43 | +# Inspect the results |
| 44 | +optimised = results.system |
| 45 | +bondlength = norm(position(optimised[1]) - position(optimised[2])) |
| 46 | +``` |
0 commit comments