============================================== Quickstart: a band on a Lennard-Jones pentamer ============================================== This page runs one GP-accelerated NEB search from the command line and shows how to read what it prints and writes. Five atoms exchange places between two equivalent trigonal bipyramids through a square-pyramidal saddle. The endpoints in ``examples/lj-pentamer/`` are relaxed structures of the built-in Lennard-Jones model (``lj``), which needs no model file. Its barrier is about 0.6232 eV for the model parameters used here. The element label is Ne, but the oracle uses the same pair potential for every atom: epsilon is 1 eV and sigma is 1 Angstrom. This is a cluster model. :doc:`The UMA band tutorial <../tutorials/uma_band>` runs the HCN to HNC reaction with a machine-learned potential. What you need ------------- - A built ``gprn``. :doc:`Installation ` lists the build routes and what each one needs. ``gprn --help`` prints the flag listing when the build works. - A build with readcon-db, enabled by default when its dependency resolves. The observation archive and certificate record below need it. - A checkout of this repository, for the endpoint files. The commands below read it through ``GPRIDGE_ROOT``; export the path of your clone if you run them by hand (``export GPRIDGE_ROOT=$PWD`` from the repository root). Step 1: check the build ----------------------- .. code:: bash gprn --help > help.txt head -n 3 help.txt gprn --list-potentials | grep -E "^lj[[:space:]]" The second command lists the potentials compiled into this binary. ``lj`` must appear with the backend ``compiled``. Other entries, such as ``uma`` and ``metatomic``, appear as ``not compiled`` unless the build enabled them. If you installed the Python module, this check runs a short dimer search on the Muller-Brown surface and needs no input files: .. code:: bash python -m gpridge.wheel_smoke Step 2: the endpoints --------------------- .. code:: bash cp "$GPRIDGE_ROOT/examples/lj-pentamer/reactant.con" reactant.con cp "$GPRIDGE_ROOT/examples/lj-pentamer/product.con" product.con test -s reactant.con && test -s product.con head -n 14 reactant.con A ``.con`` file holds one structure: a header with the cell, then one block per element with the atomic positions in Angstrom. The cell is a 30 Angstrom cube. The cluster is smaller than the box and does not interact with its periodic copies. The two files keep the same five atom identities. Two axial atoms exchange with two equatorial atoms; the fifth atom stays in place. Step 3: the band ---------------- .. code:: bash gprn --reactant reactant.con --product product.con \ --potential lj --nimages 7 --gp-model-profile gprd_zbl \ --output neb.h5 --write-con band.con > gprn.log 2>&1 grep -E '^(Converged|Certified|Oracle calls|Barrier energy).*:' gprn.log grep -q '^Converged: yes' gprn.log The flags, one by one: - ``--reactant`` and ``--product`` name the endpoint geometries. - ``--potential lj`` selects the oracle, the function that returns energy and forces. Each call to it is an oracle call and is the cost the search tries to minimise. - ``--nimages 7`` puts seven movable images between the endpoints, a band of nine. - ``--gp-model-profile gprd_zbl`` selects the model profile used in the :doc:`pentamer tutorial <../tutorials/gprn_lj_pentamer>`, including a short-range repulsive prior. - ``--output`` and ``--write-con`` name the HDF5 and ``.con`` result files. The CLI reference lists every flag with its default: :doc:`gprn and gprd flags <../reference/cli_reference>`. Step 4: read the result ----------------------- ``gprn.log`` holds the full run log. The last block of it is a summary, and the lines printed above are the ones to look at first. A representative run prints: :: Oracle calls: (neb=, dimer=0, certificate=0, transition=0) Barrier energy (eV): (forward: E_saddle - E_reactant) Converged: yes Certified: yes The IRC certificate file is written by the rgmin connectivity walk. .. code:: bash test -s obs-archive/irc_certificate.txt The oracle-call count in your run can differ with the build and the hardware. Run the quickstart in an empty directory: if ``obs-archive/`` exists, the search can reuse its observations and start from a larger training set. The lines mean: - ``Converged: yes`` says that the band reached the force tolerance (``--converged-force``, 0.05 eV/Angstrom by default) at the climbing image. - ``Certified: yes`` says that the default IRC check walked downhill in both directions and reached the two endpoints. Its record is ``obs-archive/irc_certificate.txt``. :doc:`Saddle-point certificates <../explanation/irc_certificate>` explains the checks, and :doc:`the how-to <../howto/irc_certificate>` shows how to request an independent Hessian check. - ``Barrier energy`` is the climbing-image oracle energy relative to the reactant, in eV. - ``Oracle calls`` is the number of true-potential evaluations, split by the part of the search that asked for them. .. code:: bash test -s band.con ls obs-archive grep -c '"role"' band.con The files are: - ``band.con``: the final band, nine frames, each with its energy in the frame header and the forces in a second block. - ``neb.h5``: the per-outer GP trace (schema ``gprn-gp-trace/2``): band energies, measured mask, NEB force norms, acquisition variance, hyperparameters and oracle calls. ``--trace-band-history true`` adds a global posterior snapshot per outer iteration, ``--full-h5 true`` the band, the run summary and the training set, and ``--gp-trace false`` leaves the file out. - ``obs-archive/``: every energy and gradient the oracle returned, which is the GP training set, and the certificate record. Next steps ---------- - To run a molecular reaction with a machine-learned potential, follow :doc:`the UMA band tutorial <../tutorials/uma_band>`. It needs a model file and a build with the UMA engine. - To compare the GP band with a true-force band and verify the barrier against the pair potential, follow :doc:`the first gprn band <../tutorials/gprn_lj_pentamer>`. - To run a saddle search from Python with ASE, follow :doc:`the Python API tutorial <../tutorials/first_gp_dimer>`. - To understand what the search is doing, read :doc:`how GPRidge finds a saddle <../explanation/method>`.