This package provides functionality for computing an atomic environment vector (AEV), as well as its Jacobian and Hessian. The AEV is a feature vector that is useful for representing the geometry of a molecule, or simply a set of atoms, in a manner that satisfies rotational and translational invariances. For the i-th atom in the system, its AEV is y_i=f_i(x), where x is a vector of Cartesian coordinates of all atoms in the set. The Jacobian and Hessian are with respect to the x coordinates. Ther package uses pybind11 to expose our C++ AEV library to Python, as a python package aevmod. The package folder includes:
- this README file, which can be viewed in a web browser using restview. You can use
# simple invocation in present terminal
restview README.rst &
# or, invocation in a separate xterm terminal
xterm -geometry 100x10-0-0 -e restview README.rst &- a
docfolder containing pdf documentation - an
examplesfolder containing an example applicationtaev.py - an
includefolder containing requisite sacado include files for the C++ library - a
pyproject.tomlfile containing build-system dependencies and other configuration info - a
setup.pyfile for building and installing the package - an
srcfolder containing the C++ source code - a
testsfolder containing code and data for running tests with pytest
The aevmod package is compatible with Python 3, and the pybind11 usage requires a C++ compiler that has at least C++11 functionality.
To try out aevmod, under the package folder, do:
# Build and install the package
pip install .
# Install pytest so we can run the tests
pip install pytestYou can now run the tests to confirm everything works:
pytest
====================================== test session starts =======================================
platform darwin -- Python 3.8.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /Users/hnnajm/mls/pkg/aev, configfile: setup.cfg, testpaths: tests
plugins: anyio-2.2.0
collected 6 items
tests/test_aev.py . [ 16%]
tests/test_ang_indsets.py . [ 33%]
tests/test_hes.py . [ 50%]
tests/test_jac.py . [ 66%]
tests/test_rad_indsets.py . [ 83%]
tests/test_structures.py . [100%]
======================================= 6 passed in 0.75s ========================================You can also run the example code:
python ./examples/taev.pyIf you make a code change you will need to re-build and install. You can do this using pip:
pip install --upgrade .