From 78bdcd727c8ff45e87f8d2dfa3b34b79a8db0452 Mon Sep 17 00:00:00 2001 From: Daniele Rapetti Date: Tue, 10 Oct 2023 11:00:29 +0200 Subject: [PATCH] removed old regtest --- .../rt-NeigbourlistSize/COLVAR.reference | 2 - regtest/basic/rt-NeigbourlistSize/Makefile | 1 - .../basic/rt-NeigbourlistSize/NLCounter.cpp | 134 ------------------ regtest/basic/rt-NeigbourlistSize/config | 14 -- regtest/basic/rt-NeigbourlistSize/plumed.dat | 8 -- .../rt-NeigbourlistSize1M/COLVAR.reference | 2 - regtest/basic/rt-NeigbourlistSize1M/Makefile | 1 - .../basic/rt-NeigbourlistSize1M/NLCounter.cpp | 134 ------------------ regtest/basic/rt-NeigbourlistSize1M/config | 14 -- .../basic/rt-NeigbourlistSize1M/plumed.dat | 8 -- 10 files changed, 318 deletions(-) delete mode 100644 regtest/basic/rt-NeigbourlistSize/COLVAR.reference delete mode 100644 regtest/basic/rt-NeigbourlistSize/Makefile delete mode 100644 regtest/basic/rt-NeigbourlistSize/NLCounter.cpp delete mode 100644 regtest/basic/rt-NeigbourlistSize/config delete mode 100644 regtest/basic/rt-NeigbourlistSize/plumed.dat delete mode 100644 regtest/basic/rt-NeigbourlistSize1M/COLVAR.reference delete mode 100644 regtest/basic/rt-NeigbourlistSize1M/Makefile delete mode 100644 regtest/basic/rt-NeigbourlistSize1M/NLCounter.cpp delete mode 100644 regtest/basic/rt-NeigbourlistSize1M/config delete mode 100644 regtest/basic/rt-NeigbourlistSize1M/plumed.dat diff --git a/regtest/basic/rt-NeigbourlistSize/COLVAR.reference b/regtest/basic/rt-NeigbourlistSize/COLVAR.reference deleted file mode 100644 index f7e6e0a388..0000000000 --- a/regtest/basic/rt-NeigbourlistSize/COLVAR.reference +++ /dev/null @@ -1,2 +0,0 @@ -#! FIELDS time d2 - 0.000000 737505 diff --git a/regtest/basic/rt-NeigbourlistSize/Makefile b/regtest/basic/rt-NeigbourlistSize/Makefile deleted file mode 100644 index 3703b27cea..0000000000 --- a/regtest/basic/rt-NeigbourlistSize/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../scripts/test.make diff --git a/regtest/basic/rt-NeigbourlistSize/NLCounter.cpp b/regtest/basic/rt-NeigbourlistSize/NLCounter.cpp deleted file mode 100644 index 0c278cab80..0000000000 --- a/regtest/basic/rt-NeigbourlistSize/NLCounter.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - Copyright (c) 2023 The plumed team - (see the PEOPLE file at the root of the distribution for a list of names) - - See http://www.plumed-code.org for more information. - - This file is part of plumed, version 2.0. - - plumed is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - plumed is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with plumed. If not, see . -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ -#include "colvar/Colvar.h" -#include "core/ActionRegister.h" -#include "tools/NeighborList.h" - -#include -#include - -using namespace std; - -namespace PLMD{ - -class NLCounter : public colvar::Colvar { - bool pbc{true}; - bool firsttime{true}; - bool invalidateList{true}; - bool serial{false}; - std::unique_ptr nl{nullptr}; -public: - static void registerKeywords( Keywords& keys ); - NLCounter(const ActionOptions&); -// active methods: - void calculate() override; - void prepare() override; -}; - -PLUMED_REGISTER_ACTION(NLCounter,"NLCOUNTER") - -void NLCounter::registerKeywords( Keywords& keys ){ - Colvar::registerKeywords( keys ); - keys.add("optional","NL_CUTOFF","The cutoff for the neighbor list"); - keys.add("optional","NL_STRIDE","The frequency with which we are updating the atoms in the neighbor list"); - keys.add("atoms","GROUPA","First list of atoms"); - keys.add("atoms","GROUPB","Second list of atoms (if empty, N*(N-1)/2 pairs in GROUPA are counted)"); -} - -void NLCounter::prepare() { - if(nl->getStride()>0) { - if(firsttime || (getStep()%nl->getStride()==0)) { - requestAtoms(nl->getFullAtomList()); - invalidateList=true; - firsttime=false; - } else { - requestAtoms(nl->getReducedAtomList()); - invalidateList=false; - if(getExchangeStep()) error("Neighbor lists should be updated on exchange steps - choose a NL_STRIDE which divides the exchange stride!"); - } - if(getExchangeStep()) firsttime=true; - } -} - -NLCounter::NLCounter(const ActionOptions&ao): -PLUMED_COLVAR_INIT(ao) -{ - std::vector ga_lista,gb_lista; - parseAtomList("GROUPA",ga_lista); - parseAtomList("GROUPB",gb_lista); - - bool dopair=false; - bool nopbc=!pbc; - parseFlag("NOPBC",nopbc); - pbc=!nopbc; - - double nl_cut=0.0; - int nl_st=0; - - parse("NL_CUTOFF",nl_cut); - if(nl_cut<=0.0) - error("NL_CUTOFF should be explicitly specified and positive"); - parse("NL_STRIDE",nl_st); - if(nl_st<=0) - error("NL_STRIDE should be explicitly specified and positive"); - addValueWithDerivatives(); - setNotPeriodic(); - if(gb_lista.size()>0) { - nl=Tools::make_unique(ga_lista,gb_lista,serial,dopair,pbc,getPbc(),comm,nl_cut,nl_st); - } else { - nl=Tools::make_unique(ga_lista,serial,pbc,getPbc(),comm,nl_cut,nl_st); - } - - requestAtoms(nl->getFullAtomList()); - - log.printf(" between two groups of %u and %u atoms\n",static_cast(ga_lista.size()),static_cast(gb_lista.size())); - log.printf(" first group:\n"); - for(unsigned int i=0; isize()); -} - -} - - - diff --git a/regtest/basic/rt-NeigbourlistSize/config b/regtest/basic/rt-NeigbourlistSize/config deleted file mode 100644 index 552db4b8b6..0000000000 --- a/regtest/basic/rt-NeigbourlistSize/config +++ /dev/null @@ -1,14 +0,0 @@ -type=driver -plumed_needs="dlopen" -arg="--plumed plumed.dat --ixyz trajectory.xyz" - -function plumed_regtest_before(){ -awk 'BEGIN{ - nat=1215 - printf "%i\n", nat - printf "1 1 130\n" - for(i=0;i trajectory.xyz -} diff --git a/regtest/basic/rt-NeigbourlistSize/plumed.dat b/regtest/basic/rt-NeigbourlistSize/plumed.dat deleted file mode 100644 index d1f13432e4..0000000000 --- a/regtest/basic/rt-NeigbourlistSize/plumed.dat +++ /dev/null @@ -1,8 +0,0 @@ -# This is loading a collective variable on the fly: -LOAD FILE=NLCounter.cpp - -d2: NLCOUNTER GROUPA=@mdatoms NL_CUTOFF=1.5 NL_STRIDE=1 - -PRINT FILE=COLVAR ARG=d2 FMT=%.0f - -ENDPLUMED diff --git a/regtest/basic/rt-NeigbourlistSize1M/COLVAR.reference b/regtest/basic/rt-NeigbourlistSize1M/COLVAR.reference deleted file mode 100644 index 685f1e4129..0000000000 --- a/regtest/basic/rt-NeigbourlistSize1M/COLVAR.reference +++ /dev/null @@ -1,2 +0,0 @@ -#! FIELDS time d2 - 0.000000 7381064250 diff --git a/regtest/basic/rt-NeigbourlistSize1M/Makefile b/regtest/basic/rt-NeigbourlistSize1M/Makefile deleted file mode 100644 index 3703b27cea..0000000000 --- a/regtest/basic/rt-NeigbourlistSize1M/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../scripts/test.make diff --git a/regtest/basic/rt-NeigbourlistSize1M/NLCounter.cpp b/regtest/basic/rt-NeigbourlistSize1M/NLCounter.cpp deleted file mode 100644 index 0c278cab80..0000000000 --- a/regtest/basic/rt-NeigbourlistSize1M/NLCounter.cpp +++ /dev/null @@ -1,134 +0,0 @@ -/* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - Copyright (c) 2023 The plumed team - (see the PEOPLE file at the root of the distribution for a list of names) - - See http://www.plumed-code.org for more information. - - This file is part of plumed, version 2.0. - - plumed is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - plumed is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with plumed. If not, see . -+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ -#include "colvar/Colvar.h" -#include "core/ActionRegister.h" -#include "tools/NeighborList.h" - -#include -#include - -using namespace std; - -namespace PLMD{ - -class NLCounter : public colvar::Colvar { - bool pbc{true}; - bool firsttime{true}; - bool invalidateList{true}; - bool serial{false}; - std::unique_ptr nl{nullptr}; -public: - static void registerKeywords( Keywords& keys ); - NLCounter(const ActionOptions&); -// active methods: - void calculate() override; - void prepare() override; -}; - -PLUMED_REGISTER_ACTION(NLCounter,"NLCOUNTER") - -void NLCounter::registerKeywords( Keywords& keys ){ - Colvar::registerKeywords( keys ); - keys.add("optional","NL_CUTOFF","The cutoff for the neighbor list"); - keys.add("optional","NL_STRIDE","The frequency with which we are updating the atoms in the neighbor list"); - keys.add("atoms","GROUPA","First list of atoms"); - keys.add("atoms","GROUPB","Second list of atoms (if empty, N*(N-1)/2 pairs in GROUPA are counted)"); -} - -void NLCounter::prepare() { - if(nl->getStride()>0) { - if(firsttime || (getStep()%nl->getStride()==0)) { - requestAtoms(nl->getFullAtomList()); - invalidateList=true; - firsttime=false; - } else { - requestAtoms(nl->getReducedAtomList()); - invalidateList=false; - if(getExchangeStep()) error("Neighbor lists should be updated on exchange steps - choose a NL_STRIDE which divides the exchange stride!"); - } - if(getExchangeStep()) firsttime=true; - } -} - -NLCounter::NLCounter(const ActionOptions&ao): -PLUMED_COLVAR_INIT(ao) -{ - std::vector ga_lista,gb_lista; - parseAtomList("GROUPA",ga_lista); - parseAtomList("GROUPB",gb_lista); - - bool dopair=false; - bool nopbc=!pbc; - parseFlag("NOPBC",nopbc); - pbc=!nopbc; - - double nl_cut=0.0; - int nl_st=0; - - parse("NL_CUTOFF",nl_cut); - if(nl_cut<=0.0) - error("NL_CUTOFF should be explicitly specified and positive"); - parse("NL_STRIDE",nl_st); - if(nl_st<=0) - error("NL_STRIDE should be explicitly specified and positive"); - addValueWithDerivatives(); - setNotPeriodic(); - if(gb_lista.size()>0) { - nl=Tools::make_unique(ga_lista,gb_lista,serial,dopair,pbc,getPbc(),comm,nl_cut,nl_st); - } else { - nl=Tools::make_unique(ga_lista,serial,pbc,getPbc(),comm,nl_cut,nl_st); - } - - requestAtoms(nl->getFullAtomList()); - - log.printf(" between two groups of %u and %u atoms\n",static_cast(ga_lista.size()),static_cast(gb_lista.size())); - log.printf(" first group:\n"); - for(unsigned int i=0; isize()); -} - -} - - - diff --git a/regtest/basic/rt-NeigbourlistSize1M/config b/regtest/basic/rt-NeigbourlistSize1M/config deleted file mode 100644 index c2fe5680d5..0000000000 --- a/regtest/basic/rt-NeigbourlistSize1M/config +++ /dev/null @@ -1,14 +0,0 @@ -type=driver -plumed_needs="dlopen" -arg="--plumed plumed.dat --ixyz trajectory.xyz" - -function plumed_regtest_before(){ -awk 'BEGIN{ - nat=121500 - printf "%i\n", nat - printf "1 1 130\n" - for(i=0;i trajectory.xyz -} diff --git a/regtest/basic/rt-NeigbourlistSize1M/plumed.dat b/regtest/basic/rt-NeigbourlistSize1M/plumed.dat deleted file mode 100644 index d1f13432e4..0000000000 --- a/regtest/basic/rt-NeigbourlistSize1M/plumed.dat +++ /dev/null @@ -1,8 +0,0 @@ -# This is loading a collective variable on the fly: -LOAD FILE=NLCounter.cpp - -d2: NLCOUNTER GROUPA=@mdatoms NL_CUTOFF=1.5 NL_STRIDE=1 - -PRINT FILE=COLVAR ARG=d2 FMT=%.0f - -ENDPLUMED