diff --git a/gromacs/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped b/gromacs/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped index 0d3779e07..ea57914b3 100644 --- a/gromacs/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped +++ b/gromacs/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers 2.00000000000000e-02 accumulatedWork -5.11227629613763e-03 } diff --git a/gromacs/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.restart.part0002.colvars.state.stripped b/gromacs/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.restart.part0002.colvars.state.stripped index fdda15b85..84e0c5406 100644 --- a/gromacs/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.restart.part0002.colvars.state.stripped +++ b/gromacs/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.restart.part0002.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers 2.00000000000000e-02 accumulatedWork -5.11227629613763e-03 } diff --git a/gromacs/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.colvars.state.stripped b/gromacs/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.colvars.state.stripped index 9911481d1..f4aa60ca5 100644 --- a/gromacs/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.colvars.state.stripped +++ b/gromacs/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 forceConstant 1.00000000000000e-04 } } diff --git a/gromacs/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped b/gromacs/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped index 33f59b343..1576d2adc 100644 --- a/gromacs/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped +++ b/gromacs/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 forceConstant 1.00000000000000e-04 } } diff --git a/gromacs/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.colvars.state.stripped b/gromacs/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.colvars.state.stripped index 62a058905..102fd9bb1 100644 --- a/gromacs/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers 2.00000000000000e-02 accumulatedWork -5.12652207647146e-03 } diff --git a/gromacs/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.restart.part0002.colvars.state.stripped b/gromacs/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.restart.part0002.colvars.state.stripped index 6d4f25ca1..0eb95720b 100644 --- a/gromacs/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.restart.part0002.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.restart.part0002.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers 2.00000000000000e-02 accumulatedWork -5.12652207647146e-03 } diff --git a/gromacs/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.colvars.state.stripped b/gromacs/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.colvars.state.stripped index 6634ae714..a0475b45e 100644 --- a/gromacs/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 stage 3 centers 1.50000000000000e-02 } diff --git a/gromacs/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.restart.part0002.colvars.state.stripped b/gromacs/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.restart.part0002.colvars.state.stripped index cf0222c3e..471e22f0a 100644 --- a/gromacs/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.restart.part0002.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.restart.part0002.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 stage 5 centers 2.00000000000000e-02 } diff --git a/gromacs/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped b/gromacs/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped index 0d3779e07..ea57914b3 100644 --- a/gromacs/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers 2.00000000000000e-02 accumulatedWork -5.11227629613763e-03 } diff --git a/gromacs/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.restart.part0002.colvars.state.stripped b/gromacs/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.restart.part0002.colvars.state.stripped index fdda15b85..84e0c5406 100644 --- a/gromacs/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.restart.part0002.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.restart.part0002.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers 2.00000000000000e-02 accumulatedWork -5.11227629613763e-03 } diff --git a/gromacs/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.colvars.state.stripped b/gromacs/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.colvars.state.stripped index 9911481d1..f4aa60ca5 100644 --- a/gromacs/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 forceConstant 1.00000000000000e-04 } } diff --git a/gromacs/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped b/gromacs/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped index 33f59b343..1576d2adc 100644 --- a/gromacs/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 forceConstant 1.00000000000000e-04 } } diff --git a/gromacs/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.colvars.state.stripped b/gromacs/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.colvars.state.stripped index acdf4a7e0..5bdc26330 100644 --- a/gromacs/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonicwalls1 + firstStep 0 forceConstant 4.18400000000000e-04 accumulatedWork -1.41440677278924e-01 } diff --git a/gromacs/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped b/gromacs/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped index 90084fadf..5862094a1 100644 --- a/gromacs/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonicwalls1 + firstStep 0 forceConstant 4.18400000000000e-04 accumulatedWork -1.41440677278924e-01 } diff --git a/gromacs/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.colvars.state.stripped b/gromacs/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.colvars.state.stripped index 2a8419c6a..3095b251e 100644 --- a/gromacs/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonicwalls1 + firstStep 0 forceConstant 4.18400000000000e-04 accumulatedWork -1.36982738418544e-01 } diff --git a/gromacs/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped b/gromacs/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped index e1f91f601..1f30f8ea7 100644 --- a/gromacs/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonicwalls1 + firstStep 0 forceConstant 4.18400000000000e-04 accumulatedWork -1.36982738418544e-01 } diff --git a/gromacs/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.colvars.state.stripped b/gromacs/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.colvars.state.stripped index 2a8419c6a..3095b251e 100644 --- a/gromacs/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonicwalls1 + firstStep 0 forceConstant 4.18400000000000e-04 accumulatedWork -1.36982738418544e-01 } diff --git a/gromacs/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped b/gromacs/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped index e1f91f601..1f30f8ea7 100644 --- a/gromacs/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonicwalls1 + firstStep 0 forceConstant 4.18400000000000e-04 accumulatedWork -1.36982738418544e-01 } diff --git a/gromacs/tests/library/000_distance_linear-k-moving/AutoDiff/test.colvars.state.stripped b/gromacs/tests/library/000_distance_linear-k-moving/AutoDiff/test.colvars.state.stripped index c82d0e568..3ba2ddc26 100644 --- a/gromacs/tests/library/000_distance_linear-k-moving/AutoDiff/test.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_linear-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name linear1 + firstStep 0 forceConstant -4.18400000000000e-01 accumulatedWork -5.26670061742242e+00 } diff --git a/gromacs/tests/library/000_distance_linear-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped b/gromacs/tests/library/000_distance_linear-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped index 272068767..42e46dcea 100644 --- a/gromacs/tests/library/000_distance_linear-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped +++ b/gromacs/tests/library/000_distance_linear-k-moving/AutoDiff/test.restart.part0002.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name linear1 + firstStep 0 forceConstant -4.18400000000000e-01 accumulatedWork -5.26670061742242e+00 } diff --git a/gromacs/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped b/gromacs/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped index 21b5707c1..dcbadaacf 100644 --- a/gromacs/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped +++ b/gromacs/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers ( 0.00000000000000e+00 , 0.00000000000000e+00 , 1.00000000000000e+00 , 0.00000000000000e+00 ) accumulatedWork 9.54354372629752e-01 } diff --git a/gromacs/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.restart.part0002.colvars.state.stripped b/gromacs/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.restart.part0002.colvars.state.stripped index 15b893455..6e607ba59 100644 --- a/gromacs/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.restart.part0002.colvars.state.stripped +++ b/gromacs/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.restart.part0002.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers ( 0.00000000000000e+00 , 0.00000000000000e+00 , 1.00000000000000e+00 , 0.00000000000000e+00 ) accumulatedWork 9.54354372629752e-01 } diff --git a/gromacs/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped b/gromacs/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped index de18e6775..dfb01de4b 100644 --- a/gromacs/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped +++ b/gromacs/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers ( 0.00000000000000e+00 , 0.00000000000000e+00 , 1.00000000000000e+00 , 0.00000000000000e+00 ) accumulatedWork 9.46575449173417e-01 } diff --git a/gromacs/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.restart.part0002.colvars.state.stripped b/gromacs/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.restart.part0002.colvars.state.stripped index 43fb1c702..d618e6b42 100644 --- a/gromacs/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.restart.part0002.colvars.state.stripped +++ b/gromacs/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.restart.part0002.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers ( 0.00000000000000e+00 , 0.00000000000000e+00 , 1.00000000000000e+00 , 0.00000000000000e+00 ) accumulatedWork 9.46575449173417e-01 } diff --git a/lammps/src/COLVARS/colvarproxy_lammps.cpp b/lammps/src/COLVARS/colvarproxy_lammps.cpp index b305a615f..95513547c 100644 --- a/lammps/src/COLVARS/colvarproxy_lammps.cpp +++ b/lammps/src/COLVARS/colvarproxy_lammps.cpp @@ -216,10 +216,7 @@ void colvarproxy_lammps::serialize_status(std::string &rst) // set status from string bool colvarproxy_lammps::deserialize_status(std::string &rst) { - std::istringstream is; - is.str(rst); - - if (!colvars->read_restart(is)) { + if (! colvarproxy_io::input_stream_from_string("input state string", rst)) { return false; } else { return true; diff --git a/lammps/src/COLVARS/fix_colvars.cpp b/lammps/src/COLVARS/fix_colvars.cpp index e71e0bc86..bca3a37e1 100644 --- a/lammps/src/COLVARS/fix_colvars.cpp +++ b/lammps/src/COLVARS/fix_colvars.cpp @@ -478,7 +478,6 @@ void FixColvars::setup(int vflag) if (me == 0) { setup_io(); proxy->parse_module_config(); - proxy->setup(); } init_taglist(); @@ -905,7 +904,9 @@ void FixColvars::restart(char *buf) { if (me == 0) { std::string rest_text(buf); - proxy->deserialize_status(rest_text); + if (!proxy->deserialize_status(rest_text)) { + error->all(FLERR, "Failed to set the Colvars input state from string buffer"); + } } } diff --git a/lammps/tests/interface/003_binary_restart/AutoDiff/test.colvars.out b/lammps/tests/interface/003_binary_restart/AutoDiff/test.colvars.out new file mode 100644 index 000000000..c818f9fcf --- /dev/null +++ b/lammps/tests/interface/003_binary_restart/AutoDiff/test.colvars.out @@ -0,0 +1,132 @@ +colvars: Creating proxy instance +colvars: ---------------------------------------------------------------------- +colvars: Please cite Fiorin et al, Mol Phys 2013: +colvars: https://dx.doi.org/10.1080/00268976.2013.813594 +colvars: in any publication based on this calculation. +colvars: This version was built with the C++11 standard or higher. +colvars: Using LAMMPS interface, version "2019-08-17". +colvars: ---------------------------------------------------------------------- +colvars: Reading new configuration from file "test.in": +colvars: # indexFile = "index.ndx" +colvars: The following index groups were read from the index file "index.ndx": +colvars: Protein (104 atoms). +colvars: Protein_noH (51 atoms). +colvars: Protein_Backbone (40 atoms). +colvars: Protein_C-alpha (10 atoms). +colvars: RMSD_atoms (10 atoms). +colvars: Protein_C-alpha_1_2 (2 atoms). +colvars: Protein_C-alpha_9_10 (2 atoms). +colvars: Protein_C-alpha_1 (1 atoms). +colvars: group1 (4 atoms). +colvars: Protein_C-alpha_2 (1 atoms). +colvars: group2 (4 atoms). +colvars: Protein_C-alpha_3 (1 atoms). +colvars: group3 (4 atoms). +colvars: Protein_C-alpha_4 (1 atoms). +colvars: group4 (4 atoms). +colvars: Protein_C-alpha_5 (1 atoms). +colvars: group5 (4 atoms). +colvars: Protein_C-alpha_6 (1 atoms). +colvars: group6 (4 atoms). +colvars: Protein_C-alpha_7 (1 atoms). +colvars: group7 (4 atoms). +colvars: Protein_C-alpha_8 (1 atoms). +colvars: group8 (4 atoms). +colvars: Protein_C-alpha_9 (1 atoms). +colvars: group9 (4 atoms). +colvars: Protein_C-alpha_10 (1 atoms). +colvars: group10 (4 atoms). +colvars: heavy_atoms (51 atoms). +colvars: # smp = on [default] +colvars: # colvarsTrajFrequency = 1 +colvars: # colvarsRestartFrequency = 10 +colvars: # scriptedColvarForces = off [default] +colvars: # scriptingAfterBiases = off [default] +colvars: ---------------------------------------------------------------------- +colvars: Initializing a new collective variable. +colvars: # name = "one" +colvars: Initializing a new "distance" component. +colvars: # name = "" [default] +colvars: # componentCoeff = 1 [default] +colvars: # componentExp = 1 [default] +colvars: # period = 0 [default] +colvars: # wrapAround = 0 [default] +colvars: # forceNoPBC = off [default] +colvars: # scalable = on [default] +colvars: Initializing atom group "group1". +colvars: # name = "" [default] +colvars: # centerReference = off [default] +colvars: # rotateReference = off [default] +colvars: # atomsOfGroup = "" [default] +colvars: # indexGroup = "group1" +colvars: # psfSegID = [default] +colvars: # atomsFile = "" [default] +colvars: # dummyAtom = ( 0 , 0 , 0 ) [default] +colvars: # enableForces = on [default] +colvars: # enableFitGradients = on [default] +colvars: # printAtomIDs = off [default] +colvars: Atom group "group1" defined with 4 atoms requested. +colvars: Initializing atom group "group2". +colvars: # name = "" [default] +colvars: # centerReference = off [default] +colvars: # rotateReference = off [default] +colvars: # atomsOfGroup = "" [default] +colvars: # indexGroup = "group2" +colvars: # psfSegID = [default] +colvars: # atomsFile = "" [default] +colvars: # dummyAtom = ( 0 , 0 , 0 ) [default] +colvars: # enableForces = on [default] +colvars: # enableFitGradients = on [default] +colvars: # printAtomIDs = off [default] +colvars: Atom group "group2" defined with 4 atoms requested. +colvars: # oneSiteSystemForce = off [default] +colvars: # oneSiteTotalForce = off [default] +colvars: All components initialized. +colvars: # timeStepFactor = 1 [default] +colvars: # width = 0.5 +colvars: # lowerBoundary = 0 [default] +colvars: # upperBoundary = 0 [default] +colvars: # expandBoundaries = off [default] +colvars: # extendedLagrangian = off [default] +colvars: # outputValue = on [default] +colvars: # outputVelocity = off [default] +colvars: # outputTotalForce = off [default] +colvars: # outputAppliedForce = on +colvars: # subtractAppliedForce = off [default] +colvars: # runAve = off [default] +colvars: # corrFunc = off [default] +colvars: ---------------------------------------------------------------------- +colvars: Collective variables initialized, 1 in total. +colvars: ---------------------------------------------------------------------- +colvars: Initializing a new "harmonic" instance. +colvars: # name = "harmonic1" [default] +colvars: # colvars = { one } +colvars: # outputEnergy = on +colvars: # timeStepFactor = 1 [default] +colvars: # writeTISamples = off [default] +colvars: # writeTIPMF = off [default] +colvars: # centers = { 0.1 } +colvars: # targetCenters = { 0.2 } +colvars: # targetNumSteps = 10 +colvars: # targetNumStages = 0 [default] +colvars: # outputAccumulatedWork = on +colvars: # outputCenters = on +colvars: # forceConstant = 0.001 +colvars: # targetForceConstant = -1 [default] +colvars: The force constant for colvar "one" will be rescaled to 0.004 according to the specified width (0.5). +colvars: ---------------------------------------------------------------------- +colvars: Collective variables biases initialized, 1 in total. +colvars: ---------------------------------------------------------------------- +colvars: Collective variables module (re)initialized. +colvars: ---------------------------------------------------------------------- +colvars: The restart output state file will be "rest.colvars.state". +colvars: The final output state file will be "test.colvars.state". +colvars: Writing to colvar trajectory file "test.colvars.traj". +colvars: Re-initialized atom group for variable "one":0/0. 4 atoms: total mass = 54.028, total charge = -0.72. +colvars: Re-initialized atom group for variable "one":0/1. 4 atoms: total mass = 54.028, total charge = -0.4. +colvars: Synchronizing (emptying the buffer of) trajectory file "test.colvars.traj". +colvars: Saving collective variables state to "rest.colvars.state". +colvars: Synchronizing (emptying the buffer of) trajectory file "test.colvars.traj". +colvars: Saving collective variables state to "rest.colvars.state". +colvars: Saving collective variables state to "test.colvars.state". +colvars: Resetting the Collective Variables module. diff --git a/lammps/tests/interface/003_binary_restart/AutoDiff/test.colvars.state.stripped b/lammps/tests/interface/003_binary_restart/AutoDiff/test.colvars.state.stripped new file mode 100644 index 000000000..b8c03e3a3 --- /dev/null +++ b/lammps/tests/interface/003_binary_restart/AutoDiff/test.colvars.state.stripped @@ -0,0 +1,20 @@ +configuration { + step 20 + dt 1.000000e+00 +} + +colvar { + name one + x 3.21927610288861e+00 +} + +restraint { + configuration { + step 20 + name harmonic1 + firstStep 0 + centers 2.00000000000000e-01 + accumulatedWork -1.22156562115015e-03 + } +} + diff --git a/lammps/tests/interface/003_binary_restart/AutoDiff/test.colvars.traj b/lammps/tests/interface/003_binary_restart/AutoDiff/test.colvars.traj new file mode 100644 index 000000000..899edf07b --- /dev/null +++ b/lammps/tests/interface/003_binary_restart/AutoDiff/test.colvars.traj @@ -0,0 +1,22 @@ +# step one fa_one E_harmonic1 x0_one W_harmonic1 + 0 3.20554673729024e+00 -1.24221869491610e-02 1.92888410749882e-02 1.00000000000000e-01 0.00000000000000e+00 + 1 3.20438161758906e+00 -1.23775264703562e-02 1.91503951905462e-02 1.10000000000000e-01 -1.23775264703563e-04 + 2 3.20388055819324e+00 -1.23355222327730e-02 1.90206385944045e-02 1.20000000000000e-01 -2.47130487031292e-04 + 3 3.20405695050090e+00 -1.22962278020036e-02 1.88996522698458e-02 1.30000000000000e-01 -3.70092765051328e-04 + 4 3.20488566343521e+00 -1.22595426537408e-02 1.87870482598613e-02 1.40000000000000e-01 -4.92688191588736e-04 + 5 3.20630523013386e+00 -1.22252209205354e-02 1.86820033194872e-02 1.50000000000000e-01 -6.14940400794091e-04 + 6 3.20822193294306e+00 -1.21928877317723e-02 1.85833139049503e-02 1.60000000000000e-01 -7.36869278111813e-04 + 7 3.21051524726036e+00 -1.21620609890414e-02 1.84894659376454e-02 1.70000000000000e-01 -8.58489888002227e-04 + 8 3.21304438443477e+00 -1.21321775377391e-02 1.83987164759025e-02 1.80000000000000e-01 -9.79811663379618e-04 + 9 3.21565597399793e+00 -1.21026238959917e-02 1.83091881459787e-02 1.90000000000000e-01 -1.10083790233954e-03 + 10 3.21819297026538e+00 -1.20727718810615e-02 1.82189776115188e-02 2.00000000000000e-01 -1.22156562115015e-03 + 11 3.22050455244023e+00 -1.20820182097609e-02 1.82468955026243e-02 2.00000000000000e-01 -1.22156562115015e-03 + 12 3.22245626645718e+00 -1.20898250658287e-02 1.82704837652926e-02 2.00000000000000e-01 -1.22156562115015e-03 + 13 3.22393923848317e+00 -1.20957569539327e-02 1.82884170360763e-02 2.00000000000000e-01 -1.22156562115015e-03 + 14 3.22487721259280e+00 -1.20995088503712e-02 1.82997643025264e-02 2.00000000000000e-01 -1.22156562115015e-03 + 15 3.22523054868521e+00 -1.21009221947408e-02 1.83040397453964e-02 2.00000000000000e-01 -1.22156562115015e-03 + 16 3.22499693749777e+00 -1.20999877499911e-02 1.83012129437417e-02 2.00000000000000e-01 -1.22156562115015e-03 + 17 3.22420921060027e+00 -1.20968368424011e-02 1.82916826989590e-02 2.00000000000000e-01 -1.22156562115015e-03 + 18 3.22293098631693e+00 -1.20917239452677e-02 1.82762234960701e-02 2.00000000000000e-01 -1.22156562115015e-03 + 19 3.22125091863508e+00 -1.20850036745403e-02 1.82559142267067e-02 2.00000000000000e-01 -1.22156562115015e-03 + 20 3.21927610288861e+00 -1.20771044115544e-02 1.82320563709485e-02 2.00000000000000e-01 -1.22156562115015e-03 diff --git a/lammps/tests/interface/003_binary_restart/AutoDiff/test.restart.colvars.out b/lammps/tests/interface/003_binary_restart/AutoDiff/test.restart.colvars.out new file mode 100644 index 000000000..604ec03c8 --- /dev/null +++ b/lammps/tests/interface/003_binary_restart/AutoDiff/test.restart.colvars.out @@ -0,0 +1,136 @@ +colvars: Creating proxy instance +colvars: ---------------------------------------------------------------------- +colvars: Please cite Fiorin et al, Mol Phys 2013: +colvars: https://dx.doi.org/10.1080/00268976.2013.813594 +colvars: in any publication based on this calculation. +colvars: This version was built with the C++11 standard or higher. +colvars: Using LAMMPS interface, version "2019-08-17". +colvars: ---------------------------------------------------------------------- +colvars: Reading new configuration from file "test.in": +colvars: # indexFile = "index.ndx" +colvars: The following index groups were read from the index file "index.ndx": +colvars: Protein (104 atoms). +colvars: Protein_noH (51 atoms). +colvars: Protein_Backbone (40 atoms). +colvars: Protein_C-alpha (10 atoms). +colvars: RMSD_atoms (10 atoms). +colvars: Protein_C-alpha_1_2 (2 atoms). +colvars: Protein_C-alpha_9_10 (2 atoms). +colvars: Protein_C-alpha_1 (1 atoms). +colvars: group1 (4 atoms). +colvars: Protein_C-alpha_2 (1 atoms). +colvars: group2 (4 atoms). +colvars: Protein_C-alpha_3 (1 atoms). +colvars: group3 (4 atoms). +colvars: Protein_C-alpha_4 (1 atoms). +colvars: group4 (4 atoms). +colvars: Protein_C-alpha_5 (1 atoms). +colvars: group5 (4 atoms). +colvars: Protein_C-alpha_6 (1 atoms). +colvars: group6 (4 atoms). +colvars: Protein_C-alpha_7 (1 atoms). +colvars: group7 (4 atoms). +colvars: Protein_C-alpha_8 (1 atoms). +colvars: group8 (4 atoms). +colvars: Protein_C-alpha_9 (1 atoms). +colvars: group9 (4 atoms). +colvars: Protein_C-alpha_10 (1 atoms). +colvars: group10 (4 atoms). +colvars: heavy_atoms (51 atoms). +colvars: # smp = on [default] +colvars: # colvarsTrajFrequency = 1 +colvars: # colvarsRestartFrequency = 10 +colvars: # scriptedColvarForces = off [default] +colvars: # scriptingAfterBiases = off [default] +colvars: ---------------------------------------------------------------------- +colvars: Initializing a new collective variable. +colvars: # name = "one" +colvars: Initializing a new "distance" component. +colvars: # name = "" [default] +colvars: # componentCoeff = 1 [default] +colvars: # componentExp = 1 [default] +colvars: # period = 0 [default] +colvars: # wrapAround = 0 [default] +colvars: # forceNoPBC = off [default] +colvars: # scalable = on [default] +colvars: Initializing atom group "group1". +colvars: # name = "" [default] +colvars: # centerReference = off [default] +colvars: # rotateReference = off [default] +colvars: # atomsOfGroup = "" [default] +colvars: # indexGroup = "group1" +colvars: # psfSegID = [default] +colvars: # atomsFile = "" [default] +colvars: # dummyAtom = ( 0 , 0 , 0 ) [default] +colvars: # enableForces = on [default] +colvars: # enableFitGradients = on [default] +colvars: # printAtomIDs = off [default] +colvars: Atom group "group1" defined with 4 atoms requested. +colvars: Initializing atom group "group2". +colvars: # name = "" [default] +colvars: # centerReference = off [default] +colvars: # rotateReference = off [default] +colvars: # atomsOfGroup = "" [default] +colvars: # indexGroup = "group2" +colvars: # psfSegID = [default] +colvars: # atomsFile = "" [default] +colvars: # dummyAtom = ( 0 , 0 , 0 ) [default] +colvars: # enableForces = on [default] +colvars: # enableFitGradients = on [default] +colvars: # printAtomIDs = off [default] +colvars: Atom group "group2" defined with 4 atoms requested. +colvars: # oneSiteSystemForce = off [default] +colvars: # oneSiteTotalForce = off [default] +colvars: All components initialized. +colvars: # timeStepFactor = 1 [default] +colvars: # width = 0.5 +colvars: # lowerBoundary = 0 [default] +colvars: # upperBoundary = 0 [default] +colvars: # expandBoundaries = off [default] +colvars: # extendedLagrangian = off [default] +colvars: # outputValue = on [default] +colvars: # outputVelocity = off [default] +colvars: # outputTotalForce = off [default] +colvars: # outputAppliedForce = on +colvars: # subtractAppliedForce = off [default] +colvars: # runAve = off [default] +colvars: # corrFunc = off [default] +colvars: ---------------------------------------------------------------------- +colvars: Collective variables initialized, 1 in total. +colvars: ---------------------------------------------------------------------- +colvars: Initializing a new "harmonic" instance. +colvars: # name = "harmonic1" [default] +colvars: # colvars = { one } +colvars: # outputEnergy = on +colvars: # timeStepFactor = 1 [default] +colvars: # writeTISamples = off [default] +colvars: # writeTIPMF = off [default] +colvars: # centers = { 0.1 } +colvars: # targetCenters = { 0.2 } +colvars: # targetNumSteps = 10 +colvars: # targetNumStages = 0 [default] +colvars: # outputAccumulatedWork = on +colvars: # outputCenters = on +colvars: # forceConstant = 0.001 +colvars: # targetForceConstant = -1 [default] +colvars: The force constant for colvar "one" will be rescaled to 0.004 according to the specified width (0.5). +colvars: ---------------------------------------------------------------------- +colvars: Collective variables biases initialized, 1 in total. +colvars: ---------------------------------------------------------------------- +colvars: Collective variables module (re)initialized. +colvars: ---------------------------------------------------------------------- +colvars: ---------------------------------------------------------------------- +colvars: Restarting from file "test.colvars.state". +colvars: Restarting collective variable "one" from value: 3.21928 +colvars: ---------------------------------------------------------------------- +colvars: The restart output state file will be "rest.colvars.state". +colvars: The final output state file will be "test.restart.colvars.state". +colvars: Writing to colvar trajectory file "test.restart.colvars.traj". +colvars: Re-initialized atom group for variable "one":0/0. 4 atoms: total mass = 54.028, total charge = -0.72. +colvars: Re-initialized atom group for variable "one":0/1. 4 atoms: total mass = 54.028, total charge = -0.4. +colvars: Synchronizing (emptying the buffer of) trajectory file "test.restart.colvars.traj". +colvars: Saving collective variables state to "rest.colvars.state". +colvars: Synchronizing (emptying the buffer of) trajectory file "test.restart.colvars.traj". +colvars: Saving collective variables state to "rest.colvars.state". +colvars: Saving collective variables state to "test.restart.colvars.state". +colvars: Resetting the Collective Variables module. diff --git a/lammps/tests/interface/003_binary_restart/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/interface/003_binary_restart/AutoDiff/test.restart.colvars.state.stripped new file mode 100644 index 000000000..897c1b1ee --- /dev/null +++ b/lammps/tests/interface/003_binary_restart/AutoDiff/test.restart.colvars.state.stripped @@ -0,0 +1,20 @@ +configuration { + step 40 + dt 1.000000e+00 +} + +colvar { + name one + x 3.21816782210277e+00 +} + +restraint { + configuration { + step 40 + name harmonic1 + firstStep 0 + centers 2.00000000000000e-01 + accumulatedWork -1.22156562115015e-03 + } +} + diff --git a/lammps/tests/interface/003_binary_restart/AutoDiff/test.restart.colvars.traj b/lammps/tests/interface/003_binary_restart/AutoDiff/test.restart.colvars.traj new file mode 100644 index 000000000..d7668f2c5 --- /dev/null +++ b/lammps/tests/interface/003_binary_restart/AutoDiff/test.restart.colvars.traj @@ -0,0 +1,22 @@ +# step one fa_one E_harmonic1 x0_one W_harmonic1 + 20 3.21927610420273e+00 -1.20771044168109e-02 1.82320563868192e-02 2.00000000000000e-01 -1.22156562115015e-03 + 21 3.21712493217758e+00 -1.20684997287103e-02 1.82060857127351e-02 2.00000000000000e-01 -1.22156562115015e-03 + 22 3.21491957781060e+00 -1.20596783112424e-02 1.81794801213313e-02 2.00000000000000e-01 -1.22156562115015e-03 + 23 3.21277838638075e+00 -1.20511135455230e-02 1.81536672108860e-02 2.00000000000000e-01 -1.22156562115015e-03 + 24 3.21080868797887e+00 -1.20432347519155e-02 1.81299379112181e-02 2.00000000000000e-01 -1.22156562115015e-03 + 25 3.20910075273950e+00 -1.20364030109580e-02 1.81093746802748e-02 2.00000000000000e-01 -1.22156562115015e-03 + 26 3.20772353744991e+00 -1.20308941497996e-02 1.80928017554604e-02 2.00000000000000e-01 -1.22156562115015e-03 + 27 3.20672256044185e+00 -1.20268902417674e-02 1.80807611109400e-02 2.00000000000000e-01 -1.22156562115015e-03 + 28 3.20611979984341e+00 -1.20244791993736e-02 1.80735125020211e-02 2.00000000000000e-01 -1.22156562115015e-03 + 29 3.20591518168161e+00 -1.20236607267264e-02 1.80710521589280e-02 2.00000000000000e-01 -1.22156562115015e-03 + 30 3.20608917462516e+00 -1.20243566985006e-02 1.80731442515971e-02 2.00000000000000e-01 -1.22156562115015e-03 + 31 3.20660613772624e+00 -1.20264245509050e-02 1.80793609348262e-02 2.00000000000000e-01 -1.22156562115015e-03 + 32 3.20741824461812e+00 -1.20296729784725e-02 1.80891289961239e-02 2.00000000000000e-01 -1.22156562115015e-03 + 33 3.20846986624845e+00 -1.20338794649938e-02 1.81017818722499e-02 2.00000000000000e-01 -1.22156562115015e-03 + 34 3.20970218001743e+00 -1.20388087200697e-02 1.81166144248033e-02 2.00000000000000e-01 -1.22156562115015e-03 + 35 3.21105763094978e+00 -1.20442305237991e-02 1.81329361138018e-02 2.00000000000000e-01 -1.22156562115015e-03 + 36 3.21248380017773e+00 -1.20499352007109e-02 1.81501172926665e-02 2.00000000000000e-01 -1.22156562115015e-03 + 37 3.21393637834814e+00 -1.20557455133925e-02 1.81676249854606e-02 2.00000000000000e-01 -1.22156562115015e-03 + 38 3.21538117931034e+00 -1.20615247172414e-02 1.81850473130780e-02 2.00000000000000e-01 -1.22156562115015e-03 + 39 3.21679532830021e+00 -1.20671813132008e-02 1.82021081057079e-02 2.00000000000000e-01 -1.22156562115015e-03 + 40 3.21816782210277e+00 -1.20726712884111e-02 1.82186740047531e-02 2.00000000000000e-01 -1.22156562115015e-03 diff --git a/lammps/tests/interface/003_binary_restart/lammps-version.txt b/lammps/tests/interface/003_binary_restart/lammps-version.txt new file mode 100644 index 000000000..646d758cf --- /dev/null +++ b/lammps/tests/interface/003_binary_restart/lammps-version.txt @@ -0,0 +1 @@ +LAMMPS (12 Dec 2018) diff --git a/lammps/tests/interface/003_binary_restart/notes.txt b/lammps/tests/interface/003_binary_restart/notes.txt new file mode 100644 index 000000000..ee0c0596f --- /dev/null +++ b/lammps/tests/interface/003_binary_restart/notes.txt @@ -0,0 +1 @@ +Based on 000_distance_harmonic-centers-moving diff --git a/lammps/tests/interface/003_binary_restart/test.in b/lammps/tests/interface/003_binary_restart/test.in new file mode 100644 index 000000000..165428a9d --- /dev/null +++ b/lammps/tests/interface/003_binary_restart/test.in @@ -0,0 +1,34 @@ +colvarsTrajFrequency 1 +colvarsRestartFrequency 10 +indexFile index.ndx + +colvar { + + name one + + outputAppliedForce on + + width 0.5 + + distance { + group1 { + indexGroup group1 + } + group2 { + indexGroup group2 + } + } +} + +harmonic { + colvars one + centers 0.1 + forceConstant 0.001 + + targetCenters 0.2 + targetNumSteps 10 + + outputEnergy yes + outputCenters yes + outputAccumulatedWork yes +} diff --git a/lammps/tests/interface/003_binary_restart/test.lmp.in b/lammps/tests/interface/003_binary_restart/test.lmp.in new file mode 100644 index 000000000..042dbc48e --- /dev/null +++ b/lammps/tests/interface/003_binary_restart/test.lmp.in @@ -0,0 +1,23 @@ +# -*- lammps -*- + +shell ln -fs "../common/da.ndx" "index.ndx" +shell ln -fs "../common/da-Calpha.xyz" "rmsd_atoms_refpos.xyz" +shell ln -fs "../common/da-Calpha-310turn.xyz" "rmsd_atoms_refpos2.xyz" +shell ln -fs "../common/da-noh.xyz" "heavy_atoms_refpos.xyz" +shell ln -fs "../common/da-Calpha-random.xyz" "rmsd_atoms_random.xyz" + +include ../common/charmmff.lmp.in + +# Contains positions and velocities from da.coor.pdb and da.vel.pdb +read_data ../common/da.lmp.data + +include ../common/fixes.lmp.in + +log test.out + +fix Colvars all colvars ${colvars_config} output test + +include ../common/md.lmp.in + +write_data test.lmp.data +write_restart test.lmp.bin diff --git a/lammps/tests/interface/003_binary_restart/test.restart.lmp.in b/lammps/tests/interface/003_binary_restart/test.restart.lmp.in new file mode 100644 index 000000000..fed0a1a74 --- /dev/null +++ b/lammps/tests/interface/003_binary_restart/test.restart.lmp.in @@ -0,0 +1,22 @@ +# -*- lammps -*- + +include ../common/charmmff.lmp.in + +read_restart test.lmp.bin + +include ../common/fixes.lmp.in + +log test.restart.out + +fix Colvars all colvars ${colvars_config} output test.restart + +include ../common/md.lmp.in + +write_data test.restart.lmp.data +write_restart test.restart.lmp.bin + +shell rm -f "index.ndx" +shell rm -f "rmsd_atoms_refpos.xyz" +shell rm -f "heavy_atoms_refpos.xyz" +shell rm -f "rmsd_atoms_refpos2.xyz" +shell rm -f "rmsd_atoms_random.xyz" diff --git a/lammps/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.colvars.state.stripped index 7854ad603..02bd32580 100644 --- a/lammps/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22156562115015e-03 } diff --git a/lammps/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.restart.colvars.state.stripped index 21bc7b556..072172249 100644 --- a/lammps/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22156562115015e-03 } diff --git a/lammps/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped index 24da1df72..b8c03e3a3 100644 --- a/lammps/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22156562115015e-03 } diff --git a/lammps/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped index f280c4f29..897c1b1ee 100644 --- a/lammps/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22156562115015e-03 } diff --git a/lammps/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.colvars.state.stripped index 195927eea..f3f418a45 100644 --- a/lammps/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 forceConstant 1.00000000000000e-04 } } diff --git a/lammps/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped index e699cc9c0..480907caa 100644 --- a/lammps/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 forceConstant 1.00000000000000e-04 } } diff --git a/lammps/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.colvars.state.stripped index 95b5524af..ab293b5f3 100644 --- a/lammps/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22537621691761e-03 } diff --git a/lammps/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.restart.colvars.state.stripped index b8801c7e3..369896787 100644 --- a/lammps/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22537621691761e-03 } diff --git a/lammps/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.colvars.state.stripped index 2a55ce192..4faf2a428 100644 --- a/lammps/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 stage 3 centers 1.50000000000000e-01 } diff --git a/lammps/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.restart.colvars.state.stripped index 01c13aa13..8363da394 100644 --- a/lammps/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 stage 5 centers 2.00000000000000e-01 } diff --git a/lammps/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped index 24da1df72..b8c03e3a3 100644 --- a/lammps/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22156562115015e-03 } diff --git a/lammps/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped index f280c4f29..897c1b1ee 100644 --- a/lammps/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22156562115015e-03 } diff --git a/lammps/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.colvars.state.stripped index 731bb0a1d..ac55f75be 100644 --- a/lammps/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 stage 2 forceConstant 5.50000000000000e-04 } diff --git a/lammps/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.restart.colvars.state.stripped index c734f4d77..16bbcfacc 100644 --- a/lammps/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 stage 4 forceConstant 1.00000000000000e-04 } diff --git a/lammps/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.colvars.state.stripped index 195927eea..f3f418a45 100644 --- a/lammps/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 forceConstant 1.00000000000000e-04 } } diff --git a/lammps/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped index e699cc9c0..480907caa 100644 --- a/lammps/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 forceConstant 1.00000000000000e-04 } } diff --git a/lammps/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.colvars.state.stripped index e9fe68b04..360b99196 100644 --- a/lammps/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonicwalls1 + firstStep 0 forceConstant 1.00000000000000e-04 accumulatedWork -3.38112365155375e-02 } diff --git a/lammps/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.restart.colvars.state.stripped index 16799d244..9592e0857 100644 --- a/lammps/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonicwalls1 + firstStep 0 forceConstant 1.00000000000000e-04 accumulatedWork -3.38112365155375e-02 } diff --git a/lammps/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.colvars.state.stripped index 963728178..65dbecfc8 100644 --- a/lammps/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonicwalls1 + firstStep 0 forceConstant 1.00000000000000e-04 accumulatedWork -3.27455711899810e-02 } diff --git a/lammps/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.restart.colvars.state.stripped index 2ab653cbe..44b43305a 100644 --- a/lammps/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonicwalls1 + firstStep 0 forceConstant 1.00000000000000e-04 accumulatedWork -3.27455711899810e-02 } diff --git a/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.colvars.state.stripped index 76b3c3bfd..cfb77830b 100644 --- a/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonicwalls1 + firstStep 0 stage 2 forceConstant 0.00000000000000e+00 } diff --git a/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.restart.colvars.state.stripped index 78af9877b..02f66b841 100644 --- a/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonicwalls1 + firstStep 0 stage 2 forceConstant 0.00000000000000e+00 } diff --git a/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.colvars.state.stripped index 963728178..65dbecfc8 100644 --- a/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonicwalls1 + firstStep 0 forceConstant 1.00000000000000e-04 accumulatedWork -3.27455711899810e-02 } diff --git a/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.restart.colvars.state.stripped index 2ab653cbe..44b43305a 100644 --- a/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonicwalls1 + firstStep 0 forceConstant 1.00000000000000e-04 accumulatedWork -3.27455711899810e-02 } diff --git a/lammps/tests/library/000_distance_linear-k-moving/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_distance_linear-k-moving/AutoDiff/test.colvars.state.stripped index 26ea33528..1ee153115 100644 --- a/lammps/tests/library/000_distance_linear-k-moving/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_distance_linear-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name linear1 + firstStep 0 forceConstant -1.00000000000000e-01 accumulatedWork -1.25888053272315e+00 } diff --git a/lammps/tests/library/000_distance_linear-k-moving/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_distance_linear-k-moving/AutoDiff/test.restart.colvars.state.stripped index 63bfcf422..206927af0 100644 --- a/lammps/tests/library/000_distance_linear-k-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_distance_linear-k-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name linear1 + firstStep 0 forceConstant -1.00000000000000e-01 accumulatedWork -1.25888053272315e+00 } diff --git a/lammps/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped index 694cd293d..92c1e962e 100644 --- a/lammps/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers ( 0.00000000000000e+00 , 0.00000000000000e+00 , 1.00000000000000e+00 , 0.00000000000000e+00 ) accumulatedWork 2.27812083013105e-03 } diff --git a/lammps/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped index 87b865860..10435fde3 100644 --- a/lammps/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers ( 0.00000000000000e+00 , 0.00000000000000e+00 , 1.00000000000000e+00 , 0.00000000000000e+00 ) accumulatedWork 2.27812083013105e-03 } diff --git a/lammps/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped b/lammps/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped index 003a5aee2..d0327ef22 100644 --- a/lammps/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped +++ b/lammps/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers ( 0.00000000000000e+00 , 0.00000000000000e+00 , 1.00000000000000e+00 , 0.00000000000000e+00 ) accumulatedWork 2.26087932026652e-03 } diff --git a/lammps/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped b/lammps/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped index 25ada4826..1e18236b4 100644 --- a/lammps/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/lammps/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers ( 0.00000000000000e+00 , 0.00000000000000e+00 , 1.00000000000000e+00 , 0.00000000000000e+00 ) accumulatedWork 2.26087932026652e-03 } diff --git a/namd/tests/interface/000_pbc_distance_pairs/AutoDiff/test.colvars.state.stripped b/namd/tests/interface/000_pbc_distance_pairs/AutoDiff/test.colvars.state.stripped index cf9add8bc..d91f9b11b 100644 --- a/namd/tests/interface/000_pbc_distance_pairs/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/interface/000_pbc_distance_pairs/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers ( 5.00000000000000e+00 , 1.17700000000000e+02 , 1.47100000000000e+02 , 5.00000000000000e+00 ) } } diff --git a/namd/tests/interface/006_multiple_maps/AutoDiff/test.colvars.state.stripped b/namd/tests/interface/006_multiple_maps/AutoDiff/test.colvars.state.stripped index f72246f4d..250ad7c13 100644 --- a/namd/tests/interface/006_multiple_maps/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/interface/006_multiple_maps/AutoDiff/test.colvars.state.stripped @@ -22,6 +22,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers 2.00000000000000e+00 } } diff --git a/namd/tests/interface/006_multiple_maps/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/interface/006_multiple_maps/AutoDiff/test.restart.colvars.state.stripped index fab667358..cdcef3218 100644 --- a/namd/tests/interface/006_multiple_maps/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/interface/006_multiple_maps/AutoDiff/test.restart.colvars.state.stripped @@ -22,6 +22,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers 2.00000000000000e+00 } } diff --git a/namd/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.colvars.state.stripped index 3ea9c8b01..e48d1c4ec 100644 --- a/namd/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22142486621732e-03 } diff --git a/namd/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.restart.colvars.state.stripped index 5b61c6d52..e3d52dfab 100644 --- a/namd/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_distance-grid_harmonic-centers-moving-ti/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22142486621732e-03 } diff --git a/namd/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped index 9d934f96a..4109af1f5 100644 --- a/namd/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22142486621732e-03 } diff --git a/namd/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped index a0d57fba5..100eebdff 100644 --- a/namd/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_distance-grid_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22142486621732e-03 } diff --git a/namd/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.colvars.state.stripped index d0f5bcd8c..4507a2d83 100644 --- a/namd/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 forceConstant 1.00000000000000e-04 } } diff --git a/namd/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped index a0dc61d6c..32715071f 100644 --- a/namd/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_distance-grid_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 forceConstant 1.00000000000000e-04 } } diff --git a/namd/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.colvars.state.stripped index 0a5736538..4e365695b 100644 --- a/namd/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22496300318146e-03 } diff --git a/namd/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.restart.colvars.state.stripped index 74680ffbb..e0888c9dd 100644 --- a/namd/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonic-centers-moving-full/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22496300318146e-03 } diff --git a/namd/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.colvars.state.stripped index 7eb0a5a4b..1cf9a8664 100644 --- a/namd/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 stage 3 centers 1.50000000000000e-01 } diff --git a/namd/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.restart.colvars.state.stripped index be90cdfa7..59699cf48 100644 --- a/namd/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonic-centers-moving-stages/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 stage 5 centers 2.00000000000000e-01 } diff --git a/namd/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped index 9d934f96a..4109af1f5 100644 --- a/namd/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22142486621732e-03 } diff --git a/namd/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped index a0d57fba5..100eebdff 100644 --- a/namd/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonic-centers-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -1.22142486621732e-03 } diff --git a/namd/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.colvars.state.stripped index 856acb236..57c7b11d1 100644 --- a/namd/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 stage 2 forceConstant 5.50000000000000e-04 } diff --git a/namd/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.restart.colvars.state.stripped index 2d5115d5a..b91f1692e 100644 --- a/namd/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonic-k-moving-stages/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 stage 4 forceConstant 1.00000000000000e-04 } diff --git a/namd/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.colvars.state.stripped index d0f5bcd8c..4507a2d83 100644 --- a/namd/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 forceConstant 1.00000000000000e-04 } } diff --git a/namd/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped index a0dc61d6c..32715071f 100644 --- a/namd/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonic-k-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 forceConstant 1.00000000000000e-04 } } diff --git a/namd/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.colvars.state.stripped index 22f57453d..75c48b998 100644 --- a/namd/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonicwalls1 + firstStep 0 forceConstant 1.00000000000000e-04 accumulatedWork -3.37880405409319e-02 } diff --git a/namd/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.restart.colvars.state.stripped index bd91e3d37..520580d86 100644 --- a/namd/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonicwalls-both-k-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonicwalls1 + firstStep 0 forceConstant 1.00000000000000e-04 accumulatedWork -3.37880405409319e-02 } diff --git a/namd/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.colvars.state.stripped index 2c32e3c6f..af765be67 100644 --- a/namd/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonicwalls1 + firstStep 0 forceConstant 1.00000000000000e-04 accumulatedWork -3.27231063098198e-02 } diff --git a/namd/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.restart.colvars.state.stripped index c506fa0fb..1cdd044fd 100644 --- a/namd/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonicwalls-k-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonicwalls1 + firstStep 0 forceConstant 1.00000000000000e-04 accumulatedWork -3.27231063098198e-02 } diff --git a/namd/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.colvars.state.stripped index 12c860301..20d108d8e 100644 --- a/namd/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonicwalls1 + firstStep 0 stage 2 forceConstant 0.00000000000000e+00 } diff --git a/namd/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.restart.colvars.state.stripped index a3c3c3115..0148f8e7e 100644 --- a/namd/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonicwalls-upper-k-moving-decoupling/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonicwalls1 + firstStep 0 stage 2 forceConstant 0.00000000000000e+00 } diff --git a/namd/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.colvars.state.stripped index 2c32e3c6f..af765be67 100644 --- a/namd/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonicwalls1 + firstStep 0 forceConstant 1.00000000000000e-04 accumulatedWork -3.27231063098198e-02 } diff --git a/namd/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.restart.colvars.state.stripped index c506fa0fb..1cdd044fd 100644 --- a/namd/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_distance_harmonicwalls-upper-k-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonicwalls1 + firstStep 0 forceConstant 1.00000000000000e-04 accumulatedWork -3.27231063098198e-02 } diff --git a/namd/tests/library/000_distance_linear-k-moving/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_distance_linear-k-moving/AutoDiff/test.colvars.state.stripped index c7b2edace..d40e34747 100644 --- a/namd/tests/library/000_distance_linear-k-moving/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_distance_linear-k-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name linear1 + firstStep 0 forceConstant -1.00000000000000e-01 accumulatedWork -1.25846317032503e+00 } diff --git a/namd/tests/library/000_distance_linear-k-moving/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_distance_linear-k-moving/AutoDiff/test.restart.colvars.state.stripped index 492e932c5..c2d3e24ea 100644 --- a/namd/tests/library/000_distance_linear-k-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_distance_linear-k-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name linear1 + firstStep 0 forceConstant -1.00000000000000e-01 accumulatedWork -1.25846317032503e+00 } diff --git a/namd/tests/library/000_distancedir_harmonic-ddir-moving/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_distancedir_harmonic-ddir-moving/AutoDiff/test.colvars.state.stripped index f9fd7c7b2..41cb47258 100644 --- a/namd/tests/library/000_distancedir_harmonic-ddir-moving/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_distancedir_harmonic-ddir-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers ( -7.07106781186548e-01 , 7.07106781186548e-01 , 0.00000000000000e+00 ) accumulatedWork -1.32790918552119e-03 } diff --git a/namd/tests/library/000_distancedir_harmonic-ddir-moving/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_distancedir_harmonic-ddir-moving/AutoDiff/test.restart.colvars.state.stripped index 15714b513..e86a2eb4b 100644 --- a/namd/tests/library/000_distancedir_harmonic-ddir-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_distancedir_harmonic-ddir-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers ( -7.07106781186548e-01 , 7.07106781186548e-01 , 0.00000000000000e+00 ) accumulatedWork -1.32790918552119e-03 } diff --git a/namd/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped index 200885c79..01d155e7c 100644 --- a/namd/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers ( 0.00000000000000e+00 , 0.00000000000000e+00 , 1.00000000000000e+00 , 0.00000000000000e+00 ) accumulatedWork 2.27813232055700e-03 } diff --git a/namd/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped index 205a29a6e..cc10dd18f 100644 --- a/namd/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_orientation-fitgroup_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers ( 0.00000000000000e+00 , 0.00000000000000e+00 , 1.00000000000000e+00 , 0.00000000000000e+00 ) accumulatedWork 2.27813232055700e-03 } diff --git a/namd/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped b/namd/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped index ee6a04b0d..75d556e11 100644 --- a/namd/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers ( 0.00000000000000e+00 , 0.00000000000000e+00 , 1.00000000000000e+00 , 0.00000000000000e+00 ) accumulatedWork 2.26088591477312e-03 } diff --git a/namd/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped b/namd/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped index 9c7648166..80ded7bf8 100644 --- a/namd/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped +++ b/namd/tests/library/000_orientation_harmonic-ori-moving/AutoDiff/test.restart.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 40 name harmonic1 + firstStep 0 centers ( 0.00000000000000e+00 , 0.00000000000000e+00 , 1.00000000000000e+00 , 0.00000000000000e+00 ) accumulatedWork 2.26088591477312e-03 } diff --git a/namd/tests/library/003_10ala_SMD_restart/AutoDiff/test.colvars.state.stripped b/namd/tests/library/003_10ala_SMD_restart/AutoDiff/test.colvars.state.stripped index 166b22793..20535536d 100644 --- a/namd/tests/library/003_10ala_SMD_restart/AutoDiff/test.colvars.state.stripped +++ b/namd/tests/library/003_10ala_SMD_restart/AutoDiff/test.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 10 name harmonic1 + firstStep 0 centers 1.00000000000000e-01 accumulatedWork -1.79849880092103e+03 } diff --git a/namd/tests/library/003_10ala_SMD_restart/AutoDiff/testres.colvars.state.stripped b/namd/tests/library/003_10ala_SMD_restart/AutoDiff/testres.colvars.state.stripped index 3c01586f9..0329bdfbc 100644 --- a/namd/tests/library/003_10ala_SMD_restart/AutoDiff/testres.colvars.state.stripped +++ b/namd/tests/library/003_10ala_SMD_restart/AutoDiff/testres.colvars.state.stripped @@ -12,6 +12,7 @@ restraint { configuration { step 20 name harmonic1 + firstStep 0 centers 2.00000000000000e-01 accumulatedWork -2.38254491346066e+03 } diff --git a/src/colvarbias.cpp b/src/colvarbias.cpp index 97c0c40e4..653804a4b 100644 --- a/src/colvarbias.cpp +++ b/src/colvarbias.cpp @@ -543,9 +543,6 @@ std::istream & colvarbias::read_state(std::istream &is) return is; } - cvm::log("Restarting "+bias_type+" bias \""+name+"\" from step number "+ - cvm::to_str(state_file_step)+".\n"); - if ((set_state_params(conf) != COLVARS_OK) || !read_state_data(is)) { cvm::error("Error: in reading state data for \""+bias_type+"\" bias \""+ this->name+"\" at position "+ @@ -566,6 +563,9 @@ std::istream & colvarbias::read_state(std::istream &is) is.setstate(std::ios::failbit); } + cvm::log("Restarted " + bias_type + " bias \"" + name + "\" with step number " + + cvm::to_str(state_file_step) + ".\n"); + return is; } diff --git a/src/colvarbias_restraint.cpp b/src/colvarbias_restraint.cpp index a7963c4f8..0a66a2999 100644 --- a/src/colvarbias_restraint.cpp +++ b/src/colvarbias_restraint.cpp @@ -202,6 +202,8 @@ int colvarbias_restraint_moving::init(std::string const &conf) first_step = cvm::step_absolute(); + cvm::log("Initial step for restraint change: " + cvm::to_str(first_step) + "\n"); + get_keyval(conf, "targetNumSteps", target_nsteps, target_nsteps); if (!target_nsteps) { cvm::error("Error: targetNumSteps must be non-zero.\n", COLVARS_INPUT_ERROR); @@ -232,10 +234,9 @@ std::string const colvarbias_restraint_moving::get_state_params() const std::ostringstream os; os.setf(std::ios::scientific, std::ios::floatfield); if (b_chg_centers || b_chg_force_k) { - // TODO move this + os << "firstStep " << std::setw(cvm::it_width) << first_step << "\n"; if (target_nstages) { - os << "stage " << std::setw(cvm::it_width) - << stage << "\n"; + os << "stage " << std::setw(cvm::it_width) << stage << "\n"; } } return os.str(); @@ -245,6 +246,12 @@ std::string const colvarbias_restraint_moving::get_state_params() const int colvarbias_restraint_moving::set_state_params(std::string const &conf) { if (b_chg_centers || b_chg_force_k) { + auto first_step_flags = colvarparse::parse_restart; + if (cvm::main()->restart_version_number() > 20230906) { + // Only require the first step when the code could produce it + first_step_flags = colvarparse::parse_restart | colvarparse::parse_required; + } + get_keyval(conf, "firstStep", first_step, first_step, first_step_flags); if (target_nstages) { get_keyval(conf, "stage", stage, stage, colvarparse::parse_restart | colvarparse::parse_required); diff --git a/src/colvarmodule.cpp b/src/colvarmodule.cpp index 5295e3cae..00ce62383 100644 --- a/src/colvarmodule.cpp +++ b/src/colvarmodule.cpp @@ -1207,9 +1207,17 @@ int colvarmodule::end_of_step() int colvarmodule::update_engine_parameters() { - if (this->size() == 0) return cvm::get_error(); - for (std::vector::iterator cvi = variables()->begin(); - cvi != variables()->end(); cvi++) { + if (size() == 0) { + // No-op if no variables or biases are defined + return cvm::get_error(); + } + if (proxy->simulation_running()) { + cvm::log("Current simulation parameters: initial step = " + cvm::to_str(it) + + ", integration timestep = " + cvm::to_str(dt()) + "\n"); + } + cvm::log("Updating atomic parameters (masses, charges, etc).\n"); + for (std::vector::iterator cvi = variables()->begin(); cvi != variables()->end(); + cvi++) { (*cvi)->setup(); } return (cvm::get_error() ? COLVARS_ERROR : COLVARS_OK); @@ -1307,7 +1315,7 @@ int colvarmodule::setup_input() read_restart(*input_is); cvm::log(cvm::line_marker); - proxy->close_input_stream(restart_in_name); + proxy->delete_input_stream(restart_in_name); } if (proxy->input_stream_exists("input state string")) { @@ -1316,7 +1324,7 @@ int colvarmodule::setup_input() read_restart(proxy->input_stream("input state string")); cvm::log(cvm::line_marker); - proxy->close_input_stream("input state string"); + proxy->delete_input_stream("input state string"); } return cvm::get_error(); diff --git a/src/colvarproxy_io.cpp b/src/colvarproxy_io.cpp index 8ba3b1130..7e7cd3829 100644 --- a/src/colvarproxy_io.cpp +++ b/src/colvarproxy_io.cpp @@ -293,6 +293,26 @@ int colvarproxy_io::close_input_stream(std::string const &input_name) } +int colvarproxy_io::delete_input_stream(std::string const &input_name) +{ + if (colvarproxy_io::close_input_stream(input_name) == COLVARS_OK) { + std::ifstream *ifs = dynamic_cast(input_streams_[input_name]); + if (ifs) { + delete ifs; + } else { + std::istringstream * iss = dynamic_cast(input_streams_[input_name]); + if (iss) { + delete iss; + } + } + input_streams_.erase(input_name); + return COLVARS_OK; + } + return cvm::error("Error: input file/channel \""+input_name+ + "\" does not exist.\n", COLVARS_FILE_ERROR); +} + + int colvarproxy_io::close_input_streams() { for (std::map list_input_stream_names() const;