Skip to content

Commit

Permalink
Add 'openmm' keyword to 'energy' action (#1042)
Browse files Browse the repository at this point in the history
* Update for precision

* Add openmm keyword to energy action, but keep it hidden for now

* Reorder the terms in esander output so they match energy output for
easier comparisons

* Put the new esander term ordering behind CPPTRAJ_ESANDER_ENERGY_ORDER
define for better backwards compatibility.

* Add new ordering option for test saves

* Add openmm and related keywords to energy help

* Add the 'name' keyword to help.

* Update manual emin entry, add name keyword. Add 'openmm' keyword to
energy manual entry.

* Add a tolerance

* 6.20.2. Revision bump for adding 'openmm' keyword to 'energy' action.

* Try to fix python build by using setup-python@v4

* Try to fix python environment

* Try to fix the python CI install

---------

Co-authored-by: Daniel R. Roe <daniel.roe@nih.gov>
  • Loading branch information
drroe and Daniel R. Roe authored Jul 25, 2023
1 parent 91a65d4 commit 0072a35
Show file tree
Hide file tree
Showing 21 changed files with 425 additions and 66 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/merge-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ jobs:
sudo apt-get install cmake-data cmake
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Add conda to system path
Expand All @@ -148,7 +148,7 @@ jobs:
echo $CONDA/bin >> $GITHUB_PATH
- name: Install conda packages
run: |
conda env update --file devtools/ci/environment.yml --name base
conda install setuptools cython numpy pytest mock curl
- name: Install cpptraj
run: |
export PATH=$HOME/bin:${PATH}
Expand Down
12 changes: 6 additions & 6 deletions devtools/ci/environment.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
channels:
- conda-forge
- defaults
dependencies:
- netcdf4
- pyflakes
- python=3.8
- numpy
- cython
- parmed
- pytest
- mock
- pytest
- cython
- setuptools
- curl
105 changes: 103 additions & 2 deletions doc/cpptraj.lyx
Original file line number Diff line number Diff line change
Expand Up @@ -6744,14 +6744,21 @@ reference "subsec:cpptraj_createcrd"

\begin_layout Subsection
emin
\begin_inset CommandInset label
LatexCommand label
name "subsec:cpptraj-emin"

\end_inset


\end_layout

\begin_layout LyX-Code
emin crdset <name> [trajoutname <name>] [rmstol <tol>] [nsteps <#>]
\end_layout

\begin_layout LyX-Code
[<mask>] [frame <#>] [dx0 <step0>] [out <file>]
[<mask>] [frame <#>] [dx0 <step0>] [out <file>] [name <setname>]
\end_layout

\begin_layout LyX-Code
Expand Down Expand Up @@ -6819,6 +6826,14 @@ crdset
<file>] File to write energies to.
\end_layout

\begin_layout Description
[name
\begin_inset space ~
\end_inset

<setname>] If specified, create an energy per step data set.
\end_layout

\begin_layout Description
[nonbond] If specified, use simple nonbonded potential term in additon to
bonded terms.
Expand All @@ -6841,9 +6856,61 @@ cut
<cutoff> Set nonbonded interaction cutoff in Ang.
(electrostatics and vdW).
Default 8.0.
\end_layout

\begin_layout Description
cutee
\begin_inset space ~
\end_inset

<cutoff> Set electrostatics interaction cutoff in Ang.

\end_layout

\begin_layout Description
cutnb
\begin_inset space ~
\end_inset

<cutoff> Set vdW interaction cutoff in Ang.

\end_layout

\begin_layout Description
scaleee
\begin_inset space ~
\end_inset

<factor> Scaling factor to multiply 1-4 electrostatics interactions by.

\end_layout

\begin_layout Description
scalenb
\begin_inset space ~
\end_inset

<factor> Scaling factor to multiply 1-4 vdW interactions by.
\end_layout

\begin_layout Description
shake
\begin_inset space ~
\end_inset

<type> Use SHAKE constraints of <type>:
\end_layout

\begin_deeper
\begin_layout Description
'hydrogen' Constrain bonds to hydrogen.
\end_layout

\begin_layout Description
'all' Constrain all bonds.
\end_layout

\end_deeper
\begin_layout Description
nexclude
\begin_inset space ~
Expand All @@ -6853,6 +6920,22 @@ nexclude
Default 4.
\end_layout

\begin_layout Description
qfac
\begin_inset space ~
\end_inset

<factor> Factor to use in electrostatic calculation.
\end_layout

\begin_layout Standard
DataSets Created
\end_layout

\begin_layout Description
<setname>[Energy] Total energy at each minimization step.
\end_layout

\end_deeper
\begin_layout Standard
THIS COMMAND IS STILL IN DEVELOPMENT AS OF VERSION 5.0.2.
Expand Down Expand Up @@ -25467,7 +25550,7 @@ energy
\end_layout

\begin_layout LyX-Code
energy [<name>] [<mask1>] [out <filename>] [nobondstoh]
energy [<name>] [<mask1>] [out <filename>] [nobondstoh] [openmm [<mdopts>]]
\end_layout

\begin_layout LyX-Code
Expand Down Expand Up @@ -25545,6 +25628,24 @@ energy [<name>] [<mask1>] [out <filename>] [nobondstoh]
[nobondstoh] Skip calculating the energy of bonds to hydrogen.
\end_layout

\begin_layout Description
[openmm] If specified and CPPTRAJ is compiled with OpenMM support, use OpenMM
to calculate energy.
Note this will only calculate total energy; any keywords pertaining to
individual energy components are not available.
For a list of potential options that can be used with 'openmm', see
\begin_inset CommandInset ref
LatexCommand vref
reference "subsec:cpptraj-emin"
plural "false"
caps "false"
noprefix "false"

\end_inset

.
\end_layout

\begin_layout Description
[bond] Calculate bond energy.
\end_layout
Expand Down
Loading

0 comments on commit 0072a35

Please sign in to comment.