-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.. _ref_analysis: | ||
|
||
============== | ||
Error Analysis | ||
============== | ||
|
||
The ``emle-analyze`` executable facilitates analysis of the performance of | ||
EMLE-based simulations. It requires a set of single point reference calculations | ||
for a trajectory generated with ``emle-engine`` (currently only | ||
`ORCA <https://orcaforum.kofo.mpg.de>`__ is supported). It also requires | ||
Minimal Basis Iterative Stockholder (MBIS) decomposition of the in-vacuo | ||
electronic density of the QM region with | ||
`HORTON <https://theochem.github.io/horton/2.1.1/index.html>`__. | ||
|
||
Usage: | ||
|
||
.. code-block:: text | ||
emle-analyze --qm-xyz qm.xyz \ | ||
--pc.xyz pc.xyz \ | ||
--emle-model model.mat \ | ||
--orca-tarball orca.tar \ | ||
--backend [deepmd, ani2x] | ||
--alpha | ||
result.mat | ||
Here ``qm.xyz`` and ``pc.xyz`` are the QM and MM XYZ trajectories written out by | ||
``emle-engine`` during dynamics. ``model.mat`` specifies the path to the ``EMLE`` | ||
model used. ``orca.tar`` is a tarball containing single point ``ORCA`` calculations | ||
and corresponding ``HORTON`` outputs. All files should be named as ``index.*`` | ||
where index is a numeric value identifying the snapshot (does not have to | ||
be consecutive) and the extensions are: | ||
|
||
- ``.vac.orca``: ``ORCA`` output for gas phase calculation. When ``--alpha`` | ||
argument is provided, must also include molecular dipolar polarizability (``%elprop Polar``) | ||
- ``.h5``: ``HORTON`` output for gas phase calculation | ||
- ``.pc.orca``: ``ORCA`` output for calculation with point charges | ||
- ``.pc``: charges and positions of the point charges (the ones used for ``.pc.orca`` | ||
calculation) | ||
- ``.vpot``: output of ``orca_vpot``, electrostatic potential of gas phase system at | ||
the positions of the point charges | ||
|
||
The optional ``--backend`` argument allows extraction of energies from the | ||
in vacuo backend. Currently, only the ``deepmd``, ``mace``, and ``ani2x`` | ||
backends are supported by ``emle-analyze``. When the ``deepmd`` or ``mace`` | ||
backend is used a model file must be provided with the ``--deepmd-model`` or | ||
``--mace-model`` arguments. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.. _ref_api: | ||
|
||
================= | ||
API Documentation | ||
================= | ||
|
||
The Python API (Application Programming Interface) is divided into a collection | ||
of modules. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
index_models | ||
index_calculator | ||
index_train | ||
index_backends | ||
index_analyzer | ||
index_orca_parser |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.. _ref-analyzer: | ||
|
||
emle._analyzer | ||
============== | ||
|
||
The *analyzer* module contains analyzing output from EMLE simulations. | ||
This is an internal module used by the ``emle-analyze`` script when | ||
performing :ref:`ref_analysis` on the output of an EMLE simulation. | ||
|
||
.. autoclass:: emle._analyzer.EMLEAnalyzer | ||
:no-show-inheritance: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.. _ref-backends: | ||
|
||
emle._backends | ||
============== | ||
|
||
The *backends* module classes for computing in-vacuo energies and gradients. | ||
This is an internal module. Backends are used by the :ref:`ref-calculator` and | ||
:ref:`ref-analyzer` modules. | ||
|
||
.. autoclass:: emle._backends._backend.Backend | ||
:no-show-inheritance: | ||
|
||
.. autoclass:: emle._backends.DeePMD | ||
:no-show-inheritance: | ||
|
||
.. autoclass:: emle._backends.ORCA | ||
:no-show-inheritance: | ||
|
||
.. autoclass:: emle._backends.Rascal | ||
:no-show-inheritance: | ||
|
||
.. autoclass:: emle._backends.Sander | ||
:no-show-inheritance: | ||
|
||
.. autoclass:: emle._backends.SQM | ||
:no-show-inheritance: | ||
|
||
.. autoclass:: emle._backends.XTB | ||
:no-show-inheritance: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
.. _ref-calculator: | ||
|
||
emle.calculator | ||
=============== | ||
|
||
The *calculator* module contains a calculator for computing energies and | ||
gradients. This is used by the ``emle-engine`` script to compute energies | ||
and gradients when interfacing with `sander <https://ambermd.org>`__. | ||
The calculator can also be used by `Sire <https://sire.openbiosim.org>`__ | ||
to interface with `OpenMM <http://openmm.org>`__. | ||
|
||
.. autoclass:: emle.calculator.EMLECalculator | ||
:members: | ||
:no-show-inheritance: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
.. _ref-models: | ||
|
||
emle.models | ||
=========== | ||
|
||
The *models* module contains Torch modules for creating EMLE models. | ||
|
||
.. autoclass:: emle.models.EMLEAEVComputer | ||
:no-show-inheritance: | ||
|
||
.. autoclass:: emle.models.EMLEBase | ||
:no-show-inheritance: | ||
|
||
.. autoclass:: emle.models.EMLE | ||
:no-show-inheritance: | ||
|
||
.. autoclass:: emle.models.ANI2xEMLE | ||
:no-show-inheritance: | ||
|
||
.. autoclass:: emle.models.MACEEMLE | ||
:no-show-inheritance: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.. _ref-orca-parser: | ||
|
||
emle._orca_parser | ||
================= | ||
|
||
The *orca_parser* module provides a parser for ORCA output files. | ||
This is an internal module used by the ``emle-analyze`` and | ||
``emle-train`` scripts to load simulation output prior to | ||
performing :ref:`error analysis <ref_analysis>` or | ||
:ref:`training <ref_training>`. | ||
|
||
.. autoclass:: emle._orca_parser.ORCAParser | ||
:no-show-inheritance: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.. _ref-train: | ||
|
||
emle.train | ||
========== | ||
|
||
The *train* module contains functionality for :ref:`training <ref_training>` | ||
EMLE models. The ``EMLETrainer`` class is used internally by the ``emle-train`` | ||
script but can also be used directly in Python. | ||
|
||
.. autoclass:: emle.train.EMLETrainer | ||
:no-show-inheritance: |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.. _ref_changelog: | ||
|
||
========= | ||
Changelog | ||
========= | ||
|
||
`v1.0.0 <https://github.com/chemle/emle-engine/releases/tag/v1.0.0>`_ - Oct 10 2024 | ||
----------------------------------------------------------------------------------- | ||
|
||
* Initial release of ``emle-engine``. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
.. _ref_contributing: | ||
|
||
============ | ||
Contributing | ||
============ | ||
|
||
We welcome bug-fixes and ehanchements to the codebase via pull requests to | ||
our `GitHub repository <https://github.com/chemle/emle-engine>`_. When | ||
submitting a PR, please make sure that you rebase your branch on the latest | ||
``main`` branch and that all tests pass. | ||
|
||
If you are adding a new :ref:`model <ref-models>`, please make sure that | ||
it is `TorchScript <https://pytorch.org/docs/stable/jit.html>`_ | ||
compatible. This is necessary for the model to be used with | ||
`OpenMM <http://openmm.org>`_, since the Torch models are serialized | ||
from Python, then deserialized in C++. | ||
|
||
.. note:: | ||
|
||
What works with `PyTorch <https://pytorch.org>`_ may not work with | ||
TorchScript. The use of TorchScript is the reason why some of the | ||
model code looks quite un-Pythonic, e.g. there is no inheritance. | ||
|
||
The test suite for our existing models can be found | ||
`here <https://github.com/chemle/emle-engine/blob/main/tests/test_models.py>`_. | ||
For each model we test that: 1) the model can be instantiated, | ||
2) the model can be serialiazed via TorchScript, and 3) the model | ||
can be evaluated using standard input data. If you are adding a new | ||
model, please make sure that it passes these tests. |