Update Colvars library to version 2023-05-01

This update consists exclusively of bugfixes or maintenance-related changes.

The following is a list of pull requests in the Colvars repository since the previous update to LAMMPS:

- 532 Add XYZ trajectory reading feature
  https://github.com/Colvars/colvars/pull/532 (@jhenin, @giacomofiorin)

- 531 Delete objects quietly, unless explicitly requested via script (including VMD)
  https://github.com/Colvars/colvars/pull/531 (@giacomofiorin)

- 530 Append newline to log and error messages if not already present
  https://github.com/Colvars/colvars/pull/530 (@giacomofiorin)

- 528 Forward-declare OpenMP lock
  https://github.com/Colvars/colvars/pull/528 (@giacomofiorin)

- 527 Remove unneeded STL container
  https://github.com/Colvars/colvars/pull/527 (@giacomofiorin)

- 526 Allow collecting configuration files and strings before setting up interface
  https://github.com/Colvars/colvars/pull/526 (@giacomofiorin, @jhenin)

- 523 Fallback to linearCombination when customFunction is missing in customColvar
  https://github.com/Colvars/colvars/pull/523 (@HanatoK, @giacomofiorin)

- 522 Use iostream::fail() to check for I/O error
  https://github.com/Colvars/colvars/pull/522 (@jhenin)

- 520 Fix ref count
  https://github.com/Colvars/colvars/pull/520 (@giacomofiorin)

- 513 Set target temperature through a common code path
  https://github.com/Colvars/colvars/pull/513 (@giacomofiorin, @jhenin)

- 509 Safer detection of Windows with recent Microsoft Visual Studio versions
  https://github.com/Colvars/colvars/pull/509 (@akohlmey)

- 508 Update LAMMPS patching method to reflect Lepton availability
  https://github.com/Colvars/colvars/pull/508 (@giacomofiorin)

- 497 Increase the precision of write_multicol
  https://github.com/Colvars/colvars/pull/497 (@HanatoK)

- 496 Only perform MTS automatic enable/disable for timeStepFactor > 1
  https://github.com/Colvars/colvars/pull/496 (@giacomofiorin)

- 493 Remove unused branch of quaternion input function
  https://github.com/Colvars/colvars/pull/493 (@giacomofiorin)

- 489 Ensure there are spaces between the fields in the header
  https://github.com/Colvars/colvars/pull/489 (@HanatoK)

- 487 Use map of output streams, and return references to its elements
  https://github.com/Colvars/colvars/pull/487 (@giacomofiorin, @jhenin)

- 486 Remember first step of moving restraint
  https://github.com/Colvars/colvars/pull/486 (@jhenin)

- 485 Add decoupling option for moving restraints
  https://github.com/Colvars/colvars/pull/485 (@jhenin)

- 483 Update Lepton via patching procedure
  https://github.com/Colvars/colvars/pull/483 (@giacomofiorin)

- 481 Make file-reading operations of input data abstractable
  https://github.com/Colvars/colvars/pull/481 (@giacomofiorin)

Authors: @akohlmey, @giacomofiorin, @HanatoK, @jhenin
This commit is contained in:
Giacomo Fiorin
2023-05-17 13:29:00 -04:00
parent 166301180b
commit 377c652a83
53 changed files with 2575 additions and 2273 deletions

View File

@ -10,6 +10,8 @@
#include <list>
#include <vector>
#include <algorithm>
#include <sstream>
#include <iomanip>
#include "colvarmodule.h"
#include "colvarproxy.h"
@ -29,12 +31,8 @@ cvm::atom::atom()
cvm::atom::atom(int atom_number)
{
colvarproxy *p = cvm::proxy;
colvarproxy *p = cvm::main()->proxy;
index = p->init_atom(atom_number);
if (cvm::debug()) {
cvm::log("The index of this atom in the colvarproxy arrays is "+
cvm::to_str(index)+".\n");
}
id = p->get_atom_id(index);
update_mass();
update_charge();
@ -46,12 +44,8 @@ cvm::atom::atom(cvm::residue_id const &residue,
std::string const &atom_name,
std::string const &segment_id)
{
colvarproxy *p = cvm::proxy;
colvarproxy *p = cvm::main()->proxy;
index = p->init_atom(residue, atom_name, segment_id);
if (cvm::debug()) {
cvm::log("The index of this atom in the colvarproxy_namd arrays is "+
cvm::to_str(index)+".\n");
}
id = p->get_atom_id(index);
update_mass();
update_charge();
@ -62,7 +56,9 @@ cvm::atom::atom(cvm::residue_id const &residue,
cvm::atom::atom(atom const &a)
: index(a.index)
{
id = (cvm::proxy)->get_atom_id(index);
colvarproxy *p = cvm::main()->proxy;
id = p->get_atom_id(index);
p->increase_refcount(index);
update_mass();
update_charge();
reset_data();
@ -72,7 +68,7 @@ cvm::atom::atom(atom const &a)
cvm::atom::~atom()
{
if (index >= 0) {
(cvm::proxy)->clear_atom(index);
(cvm::main()->proxy)->clear_atom(index);
}
}
@ -80,7 +76,7 @@ cvm::atom::~atom()
cvm::atom & cvm::atom::operator = (cvm::atom const &a)
{
index = a.index;
id = (cvm::proxy)->get_atom_id(index);
id = (cvm::main()->proxy)->get_atom_id(index);
update_mass();
update_charge();
reset_data();
@ -113,7 +109,7 @@ cvm::atom_group::atom_group(std::vector<cvm::atom> const &atoms_in)
cvm::atom_group::~atom_group()
{
if (is_enabled(f_ag_scalable) && !b_dummy) {
(cvm::proxy)->clear_atom_group(index);
(cvm::main()->proxy)->clear_atom_group(index);
index = -1;
}
@ -330,7 +326,7 @@ void cvm::atom_group::update_total_mass()
}
if (is_enabled(f_ag_scalable)) {
total_mass = (cvm::proxy)->get_atom_group_mass(index);
total_mass = (cvm::main()->proxy)->get_atom_group_mass(index);
} else {
total_mass = 0.0;
for (cvm::atom_iter ai = this->begin(); ai != this->end(); ai++) {
@ -351,7 +347,7 @@ void cvm::atom_group::update_total_charge()
}
if (is_enabled(f_ag_scalable)) {
total_charge = (cvm::proxy)->get_atom_group_charge(index);
total_charge = (cvm::main()->proxy)->get_atom_group_charge(index);
} else {
total_charge = 0.0;
for (cvm::atom_iter ai = this->begin(); ai != this->end(); ai++) {