Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Now cregex "appears" to be included (for backward compatibility) #1176

Merged
merged 5 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
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"
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"
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
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
Loading