COLVARS total charge

Hi LAMMPS-Users

I am using COLVARS module for Umbrella sampling. This may be a silly question - what does total charge in the COLVARS output signify (I could not figure it out from COLVARS manual). If it is the total charge of the system. the rest of the email is not relevant .

System is a mixture of polyanions and polycations and I pull one of the polycations. The system as a whole is uncharged. But each chain is charged. However, when it is showing output, the total mass is that of the reference chain but the total charge is zero. May I know why. I am posting the relevant parts of the code and data here. If needed I can post a smaller script - please let me know.

Input - colfile

colvar {
name umbsampling
width 1.0
distanceZ {
ref {atomNumbers 1}
main {atomNumbersRange 2921-2950}
}
}

Datafile for 2921-2950

2921 77 5 0.000000000 -159.867000000 -79.304500000 48.991400000
2922 77 5 0.000000000 -159.633000000 -79.042700000 48.085600000
2923 77 5 0.000000000 -159.505000000 -78.067700000 48.329300000
2924 77 5 0.000000000 -159.370000000 -77.115400000 48.229200000
2925 77 5 0.000000000 -158.975000000 -76.235300000 47.924600000
2926 77 5 0.000000000 -158.759000000 -75.371900000 47.409000000
2927 77 5 0.000000000 -158.888000000 -74.585600000 46.810400000
2928 77 5 0.000000000 -159.308000000 -74.354000000 45.929500000
2929 77 5 0.000000000 -159.971000000 -73.835200000 45.445400000
2930 77 5 0.000000000 -160.025000000 -73.710500000 44.489200000
2931 77 5 0.000000000 -160.351000000 -73.498800000 43.612000000
2932 77 5 0.000000000 -160.137000000 -73.467100000 42.703400000
2933 77 5 0.000000000 -159.983000000 -73.931900000 41.818200000
2934 77 5 0.000000000 -159.436000000 -74.735800000 41.498800000
2935 77 5 0.000000000 -159.305000000 -75.695100000 41.407200000
2936 77 6 -1.000000000 -159.977000000 -76.225500000 40.914200000
2937 77 6 -1.000000000 -160.134000000 -77.162900000 40.590300000
2938 77 6 -1.000000000 -160.334000000 -77.856700000 39.916600000
2939 77 6 -1.000000000 -160.522000000 -78.661900000 39.515000000
2940 77 6 -1.000000000 -160.585000000 -79.288200000 38.753100000
2941 77 6 -1.000000000 -161.126000000 -80.079500000 38.575400000
2942 77 6 -1.000000000 -161.333000000 -80.873100000 38.041800000
2943 77 6 -1.000000000 -161.126000000 -81.806700000 38.055600000
2944 77 6 -1.000000000 -160.789000000 -81.798100000 37.123700000
2945 77 6 -1.000000000 -160.062000000 -81.487400000 36.493400000
2946 77 6 -1.000000000 -159.375000000 -80.810600000 36.389800000
2947 77 6 -1.000000000 -158.592000000 -80.272200000 36.462600000
2948 77 6 -1.000000000 -158.555000000 -79.287900000 36.332400000
2949 77 6 -1.000000000 -157.943000000 -78.607100000 36.298000000
2950 77 6 -1.000000000 -157.129000000 -78.566200000 36.933700000

Output

colvars: Atom group “main” defined, 30 atoms initialized: total mass = 30, total charge = 0.
colvars: Initializing atom group “ref”.
colvars: # name = “” [default]
colvars: # centerReference = off [default]
colvars: # rotateReference = off [default]
colvars: # atomsOfGroup = “” [default]
colvars: # indexGroup = “” [default]
colvars: # psfSegID = [default]
colvars: # atomsFile = “” [default]
colvars: # dummyAtom = ( 0 , 0 , 0 ) [default]
colvars: # enableForces = on [default]
colvars: # enableFitGradients = on [default]
colvars: Atom group “ref” defined, 1 atoms initialized: total mass = 1, total charge = 0.
colvars: # axis = ( 0 , 0 , 1 ) [default]
colvars: # oneSiteSystemForce = off [default]
colvars: # oneSiteTotalForce = off [default]

Any help will be greatly appreciated

Hi Vaidyanathan, if you are using per-atom masses and charges (i.e. assigned to atoms individually, not based on their “type”)

The masses and charges read by Colvars at initialization time will in general be available only when the first “run” has begun, and the “fix colvars” instance communicates the relevant masses and charges from all MPI processes to the first MPI process, where the fix is executed (and output printed).

You should be seeing a “Re-inizialized atom group” message later on, where the total mass of each group is reported. Unfortunately, the updated charge is not reported yet, but it can very well be in a future version (along with a message clarifying that the masses are not ready yet).

Because the distanceZ function does not use charges, their value will not affect your calculation. Thank, you, however for pointing out the inconsistency in the output.

Giacomo

Thanks a lot for clarifying this.