DUMPMASSCHARGE
This is part of the generic module

Dump masses and charges on a selected file.

This command dumps a file containing charges and masses. It does so only once in the simulation (at first step). File can be recycled in the driver tool.

Notice that masses and charges are only written once at the beginning of the simulation. In case no atom list is provided, charges and masses for all atoms are written.

Examples

You can add the DUMPMASSCHARGE action at the end of the plumed.dat file that you use during an MD simulations:

Click on the labels of the actions for more information on what each action computes
tested on v2.9
c1: COM ATOMSthe list of atoms which are involved the virtual atom's definition. =1-10 
c2: COM ATOMSthe list of atoms which are involved the virtual atom's definition. =11-20 
DUMPATOMS ATOMSthe atom indices whose positions you would like to print out. =c1,c2 FILEcompulsory keyword 
file on which to output coordinates; extension is automatically detected =coms.xyz STRIDEcompulsory keyword ( default=1 )
the frequency with which the atoms should be output =100 
DUMPMASSCHARGE FILEcompulsory keyword 
file on which to output charges and masses. =mcfile 

In this way, you will be able to use the same masses while processing a trajectory from the driver . To do so, you need to add the –mc flag on the driver command line, e.g.

plumed driver --mc mcfile --plumed plumed.dat --ixyz traj.xyz

With the following input you can dump only the charges for a specific group:

Click on the labels of the actions for more information on what each action computes
tested on v2.9
solute_ions: GROUP ATOMSthe numerical indexes for the set of atoms in the group. =1-121,200-2012 
DUMPATOMS FILEcompulsory keyword 
file on which to output coordinates; extension is automatically detected =traj.gro ATOMSthe atom indices whose positions you would like to print out. =solute_ions STRIDEcompulsory keyword ( default=1 )
the frequency with which the atoms should be output =100 
DUMPMASSCHARGE FILEcompulsory keyword 
file on which to output charges and masses. =mcfile ATOMSthe atom indices whose charges and masses you would like to print out. =solute_ions 
Glossary of keywords and components
The atoms involved can be specified using
ATOMS the atom indices whose charges and masses you would like to print out. For more information on how to specify lists of atoms see Groups and Virtual Atoms
Compulsory keywords
STRIDE ( default=1 ) the frequency with which the atoms should be output
FILE file on which to output charges and masses.
Options
ONLY_MASSES ( default=off ) Only output masses to file
ONLY_CHARGES

( default=off ) Only output charges to file