Files
lammps/lib/colvars
Giacomo Fiorin cba479bf6e Update Colvars library to version 2025-04-18
The following is a list of pull requests relevant to LAMMPS in the Colvars repository since 2024-08-06:

- 752 New tool poisson_integrator_conv
  https://github.com/Colvars/colvars/pull/752 (@jhenin)

- 733 Custom grids for all biases
  https://github.com/Colvars/colvars/pull/733 (@giacomofiorin, @jhenin)

- 776 Avoid error in acos and asin with fast-math
  https://github.com/Colvars/colvars/pull/776 (@jhenin)

- 773 fix: fix the clang build test failure of OPES
  https://github.com/Colvars/colvars/pull/773 (@HanatoK)

- 768 fix: clamp the input values of asin and acos in case of fast math on aarch64
  https://github.com/Colvars/colvars/pull/768 (@HanatoK)

- 761 Add debug code for the Jacobi failure
  https://github.com/Colvars/colvars/pull/761 (@HanatoK)

- 759 min_image fix; Saves long runs from crashes;
  https://github.com/Colvars/colvars/pull/759 (@PolyachenkoYA)

- 757 Fix MSVC OpenMP issue
  https://github.com/Colvars/colvars/pull/757 (@HanatoK)

- 755 Fix indentation of 'Init CVC' message in standard output
  https://github.com/Colvars/colvars/pull/755 (@jhenin)

- 750 Optimize and simplify the calculation of dihedral gradients
  https://github.com/Colvars/colvars/pull/750 (@HanatoK)

- 749 Add references to new Colvars paper
  https://github.com/Colvars/colvars/pull/749 (@jhenin, @giacomofiorin)

- 740 Report the specific C++ standard at init time, stop warning about C++97/03
  https://github.com/Colvars/colvars/pull/740 (@giacomofiorin)

- 731 Improve detection of hard/mathematical boundaries
  https://github.com/Colvars/colvars/pull/731 (@giacomofiorin)

- 729 Optimize the fit gradients
  https://github.com/Colvars/colvars/pull/729 (@HanatoK, @jhenin)

- 728 Fix undefined behavior when getting the current working directory from std::filesystem
  https://github.com/Colvars/colvars/pull/728 (@giacomofiorin)

- 727 Add patchversion scripting command
  https://github.com/Colvars/colvars/pull/727 (@giacomofiorin)

- 724 Fix gradients and metric functions of distanceDir
  https://github.com/Colvars/colvars/pull/724 (@giacomofiorin)

- 715 Add missing rotation in orientation component
  https://github.com/Colvars/colvars/pull/715 (@giacomofiorin)

- 713 fix: try to solve #87 for non-scala components
  https://github.com/Colvars/colvars/pull/713 (@HanatoK)

- 709 Implementation of OPES in Colvars
  https://github.com/Colvars/colvars/pull/709 (@HanatoK, @giacomofiorin, @jhenin)

- 706 BUGFIX for Segmentation fault in colvarbias_meta::calc_energy() with useGrids off
  https://github.com/Colvars/colvars/pull/706 (@alphataubio)

- 570 enable use of CVs defined by PyTorch neural network models
  https://github.com/Colvars/colvars/pull/570 (@zwpku, @giacomofiorin, @HanatoK, @jhenin)

Authors: @alphataubio, @EzryStIago, @giacomofiorin, @HanatoK, @jhenin, @PolyachenkoYA, @zwpku
2025-04-30 15:32:30 -04:00
..
2017-08-07 17:13:01 -04:00
2017-08-07 17:13:01 -04:00

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## Collective variables module (Colvars)

A software module for molecular simulation and analysis that provides a
high-performance implementation of sampling algorithms defined on a reduced
space of continuously differentiable functions (aka collective variables).

The module itself implements a variety of functions and algorithms, including
free-energy estimators based on thermodynamic forces, non-equilibrium work and
probability distributions.


## Documentation

For a brief description see:
  https://colvars.github.io/
  https://github.com/Colvars/colvars/

For the reference manual see:
  http://colvars.github.io/colvars-refman-lammps

A PDF copy is also at:
  doc/PDF/colvars-refman-lammps.pdf

Also available is a Doxygen-based developer documentation:
  http://colvars.github.io/doxygen/html/

The reference article is:
  G. Fiorin, M. L. Klein, and J. Hénin,
  Molecular Physics 111, 3345 (2013).
  https://doi.org/10.1080/00268976.2013.813594


## Requirements

The Colvars library can be built for the most part with all major versions of
the C++ language.

A few of the most recent features require C++11 support, which is also required
by LAMMPS, so no additional notes are needed.

## How to build (CMake)

This is the recommended build recipe: no additional settings are normally
needed besides "-D PKG_COLVARS=yes".

Linking to the Lepton library, which is also used by the LEPTON LAMMPS package,
is enabled automatically.  Optionally, support for Lepton within Colvars may
be manually controlled with theCMake setting "-D COLVARS_LEPTON=yes|no".

## How to build (traditional make)

Before building LAMMPS, one must build the Colvars library in lib/colvars
and the Lepton library in lib/lepton.  For building Lepton please see the
README.md file in the lib/lepton folder.

Building the Colvars library can be done manually in the respective
folders by using or adapting one of the provided Makefiles: for example,
Makefile.g++ for the GNU compiler.

In general, it is safer to use build setting consistent with the rest of
LAMMPS.  This is best carried out from the LAMMPS src directory using a
command like these, which simply invoke the lib/colvars/Install.py script
with the specified args:

make lib-colvars                      # print help message
make lib-colvars args="-m serial"     # build with GNU g++ compiler (settings as with "make serial")
make lib-colvars args="-m mpi"        # build with default MPI compiler (settings as with "make mpi")
make lib-colvars args="-m g++-debug"  # build with GNU g++ compiler and colvars debugging enabled :pre

The "machine" argument of the "-m" flag is used to find a Makefile.machine to
use as build recipe.  If it does not already exist in lib/colvars, it will be
auto-generated by using compiler flags consistent with those parsed from the
core LAMMPS makefiles.

Optional flags may be specified as environment variables:

COLVARS_DEBUG=yes make lib-colvars args="-m machine"  # Build with debug code (much slower)
COLVARS_LEPTON=no make lib-colvars args="-m machine"  # Build without Lepton (included otherwise)

The build should produce two files: the library lib/colvars/libcolvars.a
(which also includes Lepton objects if enabled) and the specification file
lib/colvars/Makefile.lammps.  The latter is auto-generated, and normally does
not need to be edited.