Skip to content
Snippets Groups Projects
Commit 8f4daafa authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Fixed names after Carlo's feedback

all -> allatoms
physical -> mdatoms
virtual removed

See https://github.com/plumed/plumed2/pull/372
parent d32f1187
No related branches found
No related tags found
No related merge requests found
...@@ -47,7 +47,7 @@ Changes from version 2.4 which are relevant for users: ...@@ -47,7 +47,7 @@ Changes from version 2.4 which are relevant for users:
- \ref RMSD calculation has been optimized. This should positively affect the performances of CVs where - \ref RMSD calculation has been optimized. This should positively affect the performances of CVs where
many RMSDs are computed on small groups of atoms, such as secondary structure variables. many RMSDs are computed on small groups of atoms, such as secondary structure variables.
- In \ref METAD, when using a bias factor equal to one (no bias) the `rct` component is set to zero rather than to one. - In \ref METAD, when using a bias factor equal to one (no bias) the `rct` component is set to zero rather than to one.
- New shortcuts are available for selecting atoms: `@all`, `@physical`, `@virtual` (see \ref atomSpecs). - New shortcuts are available for selecting atoms: `@allatoms` and `@mdatoms` (see \ref atomSpecs).
- When using \ref MOLINFO, also the following shortcuts are available for selecting atoms: `@nucleic`, `@protein`, `@water`, `@ions`, `@hydrogens`, `@nonhydrogens`. - When using \ref MOLINFO, also the following shortcuts are available for selecting atoms: `@nucleic`, `@protein`, `@water`, `@ions`, `@hydrogens`, `@nonhydrogens`.
- When using \ref MOLINFO, individual atoms can be chosen also from water molecules (e.g. `@OW-100`). - When using \ref MOLINFO, individual atoms can be chosen also from water molecules (e.g. `@OW-100`).
......
...@@ -9,9 +9,10 @@ DUMPATOMS ATOMS=1-108,c1,c2 STRIDE=10 FILE=wrap.xyz ...@@ -9,9 +9,10 @@ DUMPATOMS ATOMS=1-108,c1,c2 STRIDE=10 FILE=wrap.xyz
WRAPAROUND ATOMS=1-108 AROUND=1 GROUPBY=12 WRAPAROUND ATOMS=1-108 AROUND=1 GROUPBY=12
DUMPATOMS ATOMS=1-108 STRIDE=10 FILE=wrap2.xyz DUMPATOMS ATOMS=1-108 STRIDE=10 FILE=wrap2.xyz
DUMPATOMS ATOMS=@all STRIDE=1 FILE=all.xyz DUMPATOMS ATOMS=@allatoms STRIDE=1 FILE=all.xyz
DUMPATOMS ATOMS=@physical STRIDE=1 FILE=physical.xyz DUMPATOMS ATOMS=@mdatoms STRIDE=1 FILE=physical.xyz
DUMPATOMS ATOMS=@virtual STRIDE=1 FILE=virtual.xyz virtuals: GROUP ATOMS=@allatoms REMOVE=@mdatoms
DUMPATOMS ATOMS=virtuals STRIDE=1 FILE=virtual.xyz
ENDPLUMED ENDPLUMED
...@@ -175,22 +175,16 @@ void ActionAtomistic::interpretAtomList( std::vector<std::string>& strings, std: ...@@ -175,22 +175,16 @@ void ActionAtomistic::interpretAtomList( std::vector<std::string>& strings, std:
// here we check if this is a special symbol for MOLINFO // here we check if this is a special symbol for MOLINFO
if( !ok && strings[i].compare(0,1,"@")==0 ) { if( !ok && strings[i].compare(0,1,"@")==0 ) {
std::string symbol=strings[i].substr(1); std::string symbol=strings[i].substr(1);
if(symbol=="all") { if(symbol=="allatoms") {
const auto n=plumed.getAtoms().getNatoms() + plumed.getAtoms().getNVirtualAtoms(); const auto n=plumed.getAtoms().getNatoms() + plumed.getAtoms().getNVirtualAtoms();
t.reserve(t.size()+n); t.reserve(t.size()+n);
for(unsigned i=0; i<n; i++) t.push_back(AtomNumber::index(i)); for(unsigned i=0; i<n; i++) t.push_back(AtomNumber::index(i));
ok=true; ok=true;
} else if(symbol=="physical") { } else if(symbol=="mdatoms") {
const auto n=plumed.getAtoms().getNatoms(); const auto n=plumed.getAtoms().getNatoms();
t.reserve(t.size()+n); t.reserve(t.size()+n);
for(unsigned i=0; i<n; i++) t.push_back(AtomNumber::index(i)); for(unsigned i=0; i<n; i++) t.push_back(AtomNumber::index(i));
ok=true; ok=true;
} else if(symbol=="virtual") {
const auto n=plumed.getAtoms().getNatoms();
const auto v=plumed.getAtoms().getNVirtualAtoms();
t.reserve(t.size()+v);
for(unsigned i=n; i<n+v; i++) t.push_back(AtomNumber::index(i));
ok=true;
} else { } else {
vector<SetupMolInfo*> moldat=plumed.getActionSet().select<SetupMolInfo*>(); vector<SetupMolInfo*> moldat=plumed.getActionSet().select<SetupMolInfo*>();
if( moldat.size()>0 ) { if( moldat.size()>0 ) {
......
...@@ -15,15 +15,16 @@ predefined as a \subpage GROUP that can be reused multiple times. Lists of atoms ...@@ -15,15 +15,16 @@ predefined as a \subpage GROUP that can be reused multiple times. Lists of atoms
In addition, there are a few shortcuts that can be used: In addition, there are a few shortcuts that can be used:
- `@physical` indicate all the physical atoms present in the MD engine (e.g. `DUMPATOMS ATOMS=@physical`). - `@mdatoms` indicate all the physical atoms present in the MD engine (e.g. `DUMPATOMS ATOMS=@mdatoms`).
- `@virtual` indicate all the \ref vatoms "virtual atoms" defined within PLUMED (e.g. `DUMPATOMS ATOMS=@virtual`). - `@allatoms` indicates all atoms, including \ref vatoms "those defined only in PLUMED" (e.g. `DUMPATOMS ATOMS=@allatoms`).
- `@all` indicates all atoms (e.g. `DUMPATOMS ATOMS=@all`).
The list of the virtual atoms defined in PLUMED can be obtained dy difference with `GROUP ATOMS=@allatoms REMOVE=@mdatoms`.
Other shortcuts are available if you loaded the structure of the molecule using the \ref MOLINFO command. Other shortcuts are available if you loaded the structure of the molecule using the \ref MOLINFO command.
All the above methods can be combined just putting one name after the other separated by a comma: All the above methods can be combined just putting one name after the other separated by a comma:
\plumedfile \plumedfile
DUMPATOMS ATOMS=1,2,10-20,40-60:5,100-70:-2,@virtual LABEL=g5 FILE=test.xyz DUMPATOMS ATOMS=1,2,10-20,40-60:5,100-70:-2 LABEL=g5 FILE=test.xyz
\endplumedfile \endplumedfile
Some collective variable must accept a fixed number of atoms, for example a \ref DISTANCE is calculated Some collective variable must accept a fixed number of atoms, for example a \ref DISTANCE is calculated
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment