# Get started The quickest way to use MLatom is to run it {doc}`online ` on the [Aitomistic Hub](https://aitomistic.xyz) or [Aitomistic Lab@XMU](https://atom.xmu.edu.cn) — nothing to install. To run locally, just install MLatom — it pulls in the required dependencies automatically (including the PyTorch/TorchANI and geometry-optimization backends the **AIQM2** example below uses). AIQM2 additionally needs the DFT-D4 program (via conda): ```bash pip install -U mlatom conda install -c conda-forge dftd4 export dftd4bin=$(which dftd4) # point MLatom at the dftd4 executable ``` See the {doc}`installation guide ` for the full dependency list and other methods. ## Quick start Optimize the geometry of a water molecule with **AIQM2** — an AI-enhanced quantum-mechanical method (native to MLatom, CHNO elements) that reaches beyond-DFT accuracy at semi-empirical cost. ### Python API ```python import mlatom as ml mol = ml.data.molecule.from_xyz_string('''3 O 0.00000 0.00000 0.11779 H 0.00000 0.75545 -0.47116 H 0.00000 -0.75545 -0.47116 ''') aiqm2 = ml.methods(method='AIQM2') opt = ml.optimize_geometry(model=aiqm2, initial_molecule=mol).optimized_molecule print(opt.energy) # optimized energy in hartree ``` To check your setup worked, the printed energy should be approximately: ```text -76.3838 ``` ### Command line (input file) The same calculation from the command line. Save the geometry as `init.xyz`: ```text 3 O 0.00000 0.00000 0.11779 H 0.00000 0.75545 -0.47116 H 0.00000 -0.75545 -0.47116 ``` and the input as `geomopt.inp`: ```text AIQM2 # method geomopt # task: geometry optimization xyzfile=init.xyz # input geometry optxyz=opt.xyz # output geometry ``` then run: ```bash mlatom geomopt.inp ``` The optimized geometry is written to `opt.xyz`, and the output reports the optimized energy (≈ -76.3838 hartree). You can also {download}`download geomopt.inp ` and {download}`init.xyz `. :::{note} Prefer zero setup? Run these online on the [Aitomistic Hub](https://aitomistic.xyz) or [Aitomistic Lab@XMU](https://atom.xmu.edu.cn) (both powered by [Protomia](https://aitomistic.com/protomia)) — no installation needed. :::