Skip to content

Commit

Permalink
Merge branch 'v2.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocamilloni committed Jan 16, 2025
2 parents a43124e + 57fddfe commit dd87c04
Show file tree
Hide file tree
Showing 23 changed files with 31 additions and 28 deletions.
1 change: 1 addition & 0 deletions regtest/basic/rt-cregex-backward-compatibility/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../scripts/test.make
3 changes: 3 additions & 0 deletions regtest/basic/rt-cregex-backward-compatibility/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type=plumed
#this just tests that config will always return cregex as existing, for backward compatibility
arg="config has cregex"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cregex on
1 change: 0 additions & 1 deletion regtest/isdb/rt-Metainference-averaging/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
plumed_needs="cregex"
type=driver
# this is to test a different name
arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f"
1 change: 0 additions & 1 deletion regtest/isdb/rt-jcoupling-string-type/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
plumed_needs="cregex"
type=driver
# this is to test a different name
arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f"
1 change: 0 additions & 1 deletion regtest/isdb/rt-metainference-mc-chunksize/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
plumed_needs="cregex"
type=driver
# this is to test a different name
arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f"
1 change: 0 additions & 1 deletion regtest/isdb/rt-metainference-optisigmamean-sem-max/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
plumed_needs="cregex"
type=driver
# this is to test a different name
arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f"
1 change: 0 additions & 1 deletion regtest/isdb/rt-metainference-optisigmamean-sem/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
plumed_needs="cregex"
type=driver
# this is to test a different name
arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f"
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#! FIELDS time sigmaMean_0_0 sigma_0 sigma_max_0 scale0_ offset0_ weight_0
0 10 1 10 1.13019842568893 0 1
0.0000000 10.0000000 1.0000000 10.0000000 1.1301984 0.0000000 1.0000000
1 change: 0 additions & 1 deletion regtest/isdb/rt-metainference-regres-zero/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
plumed_needs="cregex"
type=driver
# this is to test a different name
arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f"
2 changes: 2 additions & 0 deletions regtest/isdb/rt-metainference-regres-zero/plumed.dat
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ DSIGMA=0
LABEL=mij
TEMP=300
REGRES_ZERO=1
FMT=%12.7lf
...

JCOUPLING ...
Expand All @@ -43,6 +44,7 @@ JCOUPLING ...
DSIGMA=0
TEMP=300
RESTART=YES
FMT=%12.7lf
... JCOUPLING

BIASVALUE ARG=jmi.score
Expand Down
1 change: 0 additions & 1 deletion regtest/isdb/rt-metainferencebase-averaging/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
plumed_needs="cregex"
type=driver
# this is to test a different name
arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f"
1 change: 0 additions & 1 deletion regtest/isdb/rt-metainferencebase-regres-zero/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
plumed_needs="cregex"
type=driver

arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f"
1 change: 0 additions & 1 deletion regtest/isdb/rt-metainferencebase-sem-max/config
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
plumed_needs="cregex"
type=driver
# this is to test a different name
arg="--plumed plumed.dat --trajectory-stride 2 --timestep 0.002 --mf_xtc trajectory.xtc --dump-forces atom_forces --dump-forces-fmt=%7.3f"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! FIELDS time b.lessthan brf.lessthan br.lessthan p.lessthan prf.lessthan pr.lessthan sum
#! FIELDS time b_lessthan brf_lessthan br_lessthan p_lessthan prf_lessthan pr_lessthan sum
0.000000 0.0607 0.1654 0.1654 0.2681 0.1425 0.1425 0.3287
0.050000 0.0000 42.5600 42.5600 14.6579 4.1424 4.1424 14.6579
0.100000 0.0188 34.0262 34.0262 13.0049 3.2851 3.2851 13.0238
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#! FIELDS time b.lessthan brf.lessthan br.lessthan p.lessthan prf.lessthan pr.lessthan sum @8.bias @8.force2
0.000000 -0.3893763023 -0.1653910914 -0.1653910914 -0.5967893540 -0.1425260828 -0.1425260828 -0.3287218854 0.0000000000 0.0000000000
0.050000 -14.6578542139 -42.5600014141 -42.5600014141 -29.3157084279 -4.1424316083 -4.1424316083 -14.6578542139 0.0000000000 0.0000000000
0.100000 -13.0426114706 -34.0261914601 -34.0261914601 -26.0287209912 -3.2850812434 -3.2850812434 -13.0237774873 0.0000000000 0.0000000000
0.150000 -16.2009073956 -47.7585572573 -47.7585572573 -32.4018147912 -4.3920871588 -4.3920871588 -16.2009073956 0.0000000000 0.0000000000
0.200000 -57.6661791916 -2.2688460225 -2.2688460225 -115.3323583831 -45.9215920978 -45.9215920978 -57.6661791916 0.0000000000 0.0000000000
0.250000 -100.7083276804 -4.8852734198 -4.8852734198 -201.4166553607 -83.4591661722 -83.4591661722 -100.7083276804 0.0000000000 0.0000000000
#! FIELDS time b_lessthan brf_lessthan br_lessthan p_lessthan prf_lessthan pr_lessthan sum
0.000000 -0.3893763023 -0.1653910914 -0.1653910914 -0.5967893540 -0.1425260828 -0.1425260828 -0.3287218854
0.050000 -14.6578542139 -42.5600014141 -42.5600014141 -29.3157084279 -4.1424316083 -4.1424316083 -14.6578542139
0.100000 -13.0426114706 -34.0261914601 -34.0261914601 -26.0287209912 -3.2850812434 -3.2850812434 -13.0237774873
0.150000 -16.2009073956 -47.7585572573 -47.7585572573 -32.4018147912 -4.3920871588 -4.3920871588 -16.2009073956
0.200000 -57.6661791916 -2.2688460225 -2.2688460225 -115.3323583831 -45.9215920978 -45.9215920978 -57.6661791916
0.250000 -100.7083276804 -4.8852734198 -4.8852734198 -201.4166553607 -83.4591661722 -83.4591661722 -100.7083276804
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ COMBINE ARG=b.lessthan,p.lessthan PERIODIC=NO LABEL=sum

RESTRAINT ARG=b.*,brf.*,br.*,p.*,prf.*,pr.*,sum KAPPA=1.,1.,1.,1,1,1,1 AT=0,0,0,0,0,0,0 SLOPE=0,0,0,0,0,0,0

DUMPFORCES ARG=* FILE=forces STRIDE=1
DUMPFORCES ARG=b.*,brf.*,br.*,p.*,prf.*,pr.*,sum FILE=forces STRIDE=1

PRINT ARG=b.*,brf.*,br.*,p.*,prf.*,pr.*,sum STRIDE=1 FILE=colvar FMT=%8.4f

3 changes: 2 additions & 1 deletion src/config/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ bool hasDlopen();

bool isInstalled();

bool hasCregex();
/// This will always return true for backward compatibility
constexpr bool hasCregex() {return true;}

bool hasMolfile();

Expand Down
8 changes: 0 additions & 8 deletions src/config/Config.inc.in
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,6 @@ bool hasDlopen() {
#endif
}

bool hasCregex() {
#ifdef __PLUMED_HAS_CREGEX
return true;
#else
return false;
#endif
}

bool hasMolfile() {
#ifdef __PLUMED_HAS_MOLFILE_PLUGINS
return true;
Expand Down
5 changes: 5 additions & 0 deletions src/isdb/Metainference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ void Metainference::registerKeywords(Keywords& keys) {
keys.add("optional","MC_STEPS","number of MC steps");
keys.add("optional","MC_CHUNKSIZE","MC chunksize");
keys.add("optional","STATUS_FILE","write a file with all the data useful for restart/continuation of Metainference");
keys.add("optional","FMT","specify format for HILLS files (useful for decrease the number of digits in regtests)");
keys.add("compulsory","WRITE_STRIDE","10000","write the status to a file every N steps, this can be used for restart/continuation");
keys.add("optional","SELECTOR","name of selector");
keys.add("optional","NSELECT","range of values for selector [0, N-1]");
Expand Down Expand Up @@ -590,6 +591,9 @@ Metainference::Metainference(const ActionOptions&ao):
/* in this case Dsigma is initialised after reading the restart file if present */
}

std::string fmt_;
parse("FMT",fmt_);

// monte carlo stuff
parse("MC_STEPS",MCsteps_);
parse("MC_CHUNKSIZE", MCchunksize_);
Expand Down Expand Up @@ -901,6 +905,7 @@ Metainference::Metainference(const ActionOptions&ao):
if(write_stride_>0) {
sfile_.link(*this);
sfile_.open(status_file_name_);
if(fmt_.length()>0) sfile_.fmtField(fmt_);
}

log<<" Bibliography "<<plumed.cite("Bonomi, Camilloni, Cavalli, Vendruscolo, Sci. Adv. 2, e150117 (2016)");
Expand Down
4 changes: 4 additions & 0 deletions src/isdb/MetainferenceBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ void MetainferenceBase::registerKeywords( Keywords& keys ) {
keys.add("optional","MC_STEPS","number of MC steps");
keys.add("optional","MC_CHUNKSIZE","MC chunksize");
keys.add("optional","STATUS_FILE","write a file with all the data useful for restart/continuation of Metainference");
keys.add("optional","FMT","specify format for HILLS files (useful for decrease the number of digits in regtests)");
keys.add("compulsory","WRITE_STRIDE","10000","write the status to a file every N steps, this can be used for restart/continuation");
keys.add("optional","SELECTOR","name of selector");
keys.add("optional","NSELECT","range of values for selector [0, N-1]");
Expand Down Expand Up @@ -317,6 +318,8 @@ MetainferenceBase::MetainferenceBase(const ActionOptions&ao):
/* in this case Dsigma is initialised after reading the restart file if present */
}

parse("FMT",fmt_);

// monte carlo stuff
parse("MC_STEPS",MCsteps_);
parse("MC_CHUNKSIZE", MCchunksize_);
Expand Down Expand Up @@ -359,6 +362,7 @@ MetainferenceBase::MetainferenceBase(const ActionOptions&ao):
if(write_stride_>0&&doscore_) {
sfile_.link(*this);
sfile_.open(status_file_name_);
if(fmt_.length()>0) sfile_.fmtField(fmt_);
}

}
Expand Down
1 change: 1 addition & 0 deletions src/isdb/MetainferenceBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ class MetainferenceBase :
// restart
std::string status_file_name_;
OFile sfile_;
std::string fmt_;

// others
bool firstTime;
Expand Down
2 changes: 2 additions & 0 deletions src/maketools/update-config-txt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ echo "# if option xx is on then plumed has beeen compiled with -D__PLUMED_HAS_XX
echo "has $u off"
fi
done
#this is here for backward compatibility (since we are using c++17 that has <regex>)
echo "has cregex on"
} | sort
echo
echo "# other defines"
Expand Down

1 comment on commit dd87c04

@PlumedBot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found broken examples in automatic/ANGLES.tmp
Found broken examples in automatic/ANN.tmp
Found broken examples in automatic/CAVITY.tmp
Found broken examples in automatic/CLASSICAL_MDS.tmp
Found broken examples in automatic/CLUSTER_DIAMETER.tmp
Found broken examples in automatic/CLUSTER_DISTRIBUTION.tmp
Found broken examples in automatic/CLUSTER_PROPERTIES.tmp
Found broken examples in automatic/CONSTANT.tmp
Found broken examples in automatic/CONTACT_MATRIX.tmp
Found broken examples in automatic/CONTACT_MATRIX_PROPER.tmp
Found broken examples in automatic/CONVERT_TO_FES.tmp
Found broken examples in automatic/COORDINATIONNUMBER.tmp
Found broken examples in automatic/DFSCLUSTERING.tmp
Found broken examples in automatic/DISTANCE_FROM_CONTOUR.tmp
Found broken examples in automatic/DUMPCUBE.tmp
Found broken examples in automatic/DUMPGRID.tmp
Found broken examples in automatic/EDS.tmp
Found broken examples in automatic/EMMI.tmp
Found broken examples in automatic/ENVIRONMENTSIMILARITY.tmp
Found broken examples in automatic/FIND_CONTOUR.tmp
Found broken examples in automatic/FIND_CONTOUR_SURFACE.tmp
Found broken examples in automatic/FIND_SPHERICAL_CONTOUR.tmp
Found broken examples in automatic/FOURIER_TRANSFORM.tmp
Found broken examples in automatic/FUNCPATHGENERAL.tmp
Found broken examples in automatic/FUNCPATHMSD.tmp
Found broken examples in automatic/FUNNEL.tmp
Found broken examples in automatic/FUNNEL_PS.tmp
Found broken examples in automatic/GHBFIX.tmp
Found broken examples in automatic/GPROPERTYMAP.tmp
Found broken examples in automatic/HBOND_MATRIX.tmp
Found broken examples in automatic/HISTOGRAM.tmp
Found broken examples in automatic/INCLUDE.tmp
Found broken examples in automatic/INCYLINDER.tmp
Found broken examples in automatic/INENVELOPE.tmp
Found broken examples in automatic/INTERPOLATE_GRID.tmp
Found broken examples in automatic/LOCAL_AVERAGE.tmp
Found broken examples in automatic/MAZE_OPTIMIZER_BIAS.tmp
Found broken examples in automatic/MAZE_RANDOM_ACCELERATION_MD.tmp
Found broken examples in automatic/MAZE_SIMULATED_ANNEALING.tmp
Found broken examples in automatic/MAZE_STEERED_MD.tmp
Found broken examples in automatic/METATENSOR.tmp
Found broken examples in automatic/MULTICOLVARDENS.tmp
Found broken examples in automatic/OUTPUT_CLUSTER.tmp
Found broken examples in automatic/PAMM.tmp
Found broken examples in automatic/PCA.tmp
Found broken examples in automatic/PCAVARS.tmp
Found broken examples in automatic/PIV.tmp
Found broken examples in automatic/PLUMED.tmp
Found broken examples in automatic/PYCVINTERFACE.tmp
Found broken examples in automatic/PYTHONFUNCTION.tmp
Found broken examples in automatic/Q3.tmp
Found broken examples in automatic/Q4.tmp
Found broken examples in automatic/Q6.tmp
Found broken examples in automatic/QUATERNION.tmp
Found broken examples in automatic/REWEIGHT_BIAS.tmp
Found broken examples in automatic/REWEIGHT_METAD.tmp
Found broken examples in automatic/SIZESHAPE_POSITION_LINEAR_PROJ.tmp
Found broken examples in automatic/SIZESHAPE_POSITION_MAHA_DIST.tmp
Found broken examples in automatic/SPRINT.tmp
Found broken examples in automatic/TETRAHEDRALPORE.tmp
Found broken examples in automatic/TORSIONS.tmp
Found broken examples in automatic/WHAM_HISTOGRAM.tmp
Found broken examples in automatic/WHAM_WEIGHTS.tmp
Found broken examples in AnalysisPP.md
Found broken examples in CollectiveVariablesPP.md
Found broken examples in MiscelaneousPP.md

Please sign in to comment.