Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable use of CVs defined by PyTorch neural network models (#570)
Squashed commit of PR #570 * In the process of implementing torchann colvar * Implementing torchann * Implemented calc_gradients and apply_forces * Start working * Handling periodicity; test torchANN with phi angle * Add output_index to specify the component of output layer that is used * up * Update gromacs-2021.6 patch * modify patch files for namd to support LibTorch * Add test for torchann * minor changes * Modified test for torchann component * Add figures for AutoEncoder CV * Convert unit of atom coordinates to angstrom before feeding to torch model * Bug fixed in gradient of torchann * Add Torch in lammps' cmake * Added test files for torchann in NAMD * Minor changes in torchann component * Updated patches for Gromacs 2020.x and 2022.x * Updated torchann in header file; Removed test for torchann component * Add tests for Gromacs and NAMD * Add tests for Gromacs and NAMD * Updated torchann-namd test and references * Reimplement torchann as a derived class of LinearCombination * declare torchann cvc as scalar * allocate memory of cv_force before use * c++17 instead of c++14 * removed file to correct place * removed file to correct place * Minor correction in apply_force of torchann * Add tests for gromacs and NAMD * Modified the definition of cv_force such that it contains the information on the size * Add option to set data type in torchann * Add option to set data type in torchann * Enable GPU support; Further tests are needed. * updated patch for gromacs-2021.x * updated patch for gromacs-2022 * Updated patch for gromacs-2020.x * Update namd config to support GPU * Do not require libtorch in lammps by default * Minor changes (spaces/indent) in code; Removed tests for namd and gromacs backend * update namd config patch to make namd3 work * updated patch for gromacs 2023 to support torchann * merge torchann squash * Do not use GPU * merged with master and changed torchann class based on HanatoK's suggestions * Added torchann tests for gromacs and namd (only when libtorch is linked) * Add torch option to library CMake file * Use the same code from distanceZ to handle nearest-image convection * Squash-merge of master branch * Integrate libTorch CMake recipe into GROMACS main * Fix NAMD build dependencies * Restore componentDisabled and make it more generally usable * Integrate cvc base class improvements with torchANN * Fix CMakeFile for Gromacs 2024 Also allow torchANN components to be declared as periodic to fix the regtest * Set PRNG seed in Gromacs regtests * Update patches for GMX CMake files Had to make separate patch for the mdmodules version * Add patch for gmxManageColvars.cmake * Use Clang and ccache more often when available * Find PyTorch through CMake and switch to -DCOLVARS_TORCH as macro * Update CentOS9-devel container recipe * Use libTorch from container when available * Remove pre-C++11 stuff * Add torchann test for standalone library * Disable torchann test when not building with libTorch * Enable Torch interface only when the requested C++ standard supports it * Raise the CMAKE_CXX_STANDARD to 17 if libtorch is used and CMAKE_CXX_STANDARD is less than 17 * Squash-merge of master branch * Remove patch files for old and unsupported GROMACS versions * Merge branch 'master' * - Isolated torch-related code - Removed componentDisabled * minor fix * Add torch header file to dependence file of backends * fixed bug when torch is not available * Merge branch 'master' * Enable Torch in GROMACS builds when available from CI container * Do not duplicate libTorch C++ flags * Document apptainer push * Let GROMACS use the newer CMake when available * Squash-merge of master branch * Squash-merge of master branch * Set damping=0 in gromacs regtest for torchann class. Updated reference files accordingly. * Updated references files generated by Gromacs with double precision * Minor corrections in reference files. * Squashed merge of master branch --------- Co-authored-by: Zhang <[email protected]> Co-authored-by: Zhang <[email protected]> Co-authored-by: Jérôme Hénin <[email protected]> Co-authored-by: Giacomo Fiorin <[email protected]> Co-authored-by: HanatoK <[email protected]> Co-authored-by: Zhang <[email protected]>
- Loading branch information