Dear Plumed Developer and users
I am following Combining multiple restraints tutorial for my system of COM restraints , for that I have generated 20 different positions by considering the following .sh file
#!/bin/bash
file="confout.gro"
for i in `seq 0.5 0.1 2.5`;do
mkdir US_$i
cd US_$i
cat >plumed.dat <<EOF
#set up variables for distance calculation
# this is a center of mass of a large group
UNITS LENGTH=nm TIME=ps ENERGY=kj/mol
com1: COM ATOMS=1-22
com2: COM ATOMS=23-44
dist: DISTANCE ATOMS=com1,com2 COMPONENTS
# this makes a new variable, dd, equal to d and periodic, with domain 0,7
# this is the right choise if e.g. the cell is orthorombic and its size in
# z direction is 7 nm.
restraint-dist: RESTRAINT ARG=dist.z KAPPA=1000 AT=$i
PRINT STRIDE=10 ARG=dist.z,restraint-dist.bias FILE=COLVAR$i
EOF
gmx grompp -f final-npt.mdp -c initial.gro -p topol.top -maxwarn 1
cd ..
echo " US_$i completed"
done
for i in `seq 0.5 0.1 2.5`;do
cd US_$i
gmx mdrun -s topol.tpr -plumed plumed.dat -x traj$i.xtc -append -cpi &
until [ -f "$file" ]
do
sleep 60
done
echo "GRO File found shift to another directory"
cd ..
done
After completing all simulation I did trajcat by considering all 20 trajectory
gmx trjcat -cat -f traj*.xtc -o alltraj.xtc
but when I am trying to do the next step by using .sh file
#!/bin/bash
for i in `seq 0.5 0.1 2.5`;do
cat >plumed.dat <<EOF
#set up variables for distance calculation
# this is a center of mass of a large group
UNITS LENGTH=nm TIME=ps ENERGY=kj/mol
com1: COM ATOMS=1-22
com2: COM ATOMS=23-44
dist: DISTANCE ATOMS=com1,com2 COMPONENTS
restraint-dist: RESTRAINT ARG=dist.z KAPPA=1000 AT=$i
PRINT STRIDE=10 ARG=dist.z,restraint-dist.bias FILE=COLVAR$i
EOF
plumed driver --mf_xtc alltraj.xtc --trajectory-stride=10 --plumed plumed.dat
done
I got an error
PLUMED: ################################################################################
PLUMED:
PLUMED:
PLUMED: +++ PLUMED error
PLUMED: +++ at Action.cpp:242, function void PLMD::Action::error(const string&) const
PLUMED: +++ message follows +++
PLUMED: ERROR in input to action COM with label com1 : You are trying to compute a CENTER or COM but masses are not known.
PLUMED: If you are using plumed driver, please use the --mc option
PLUMED:
PLUMED: ################################################################################
PLUMED:
PLUMED: Cycles Total Average Minumum Maximum
PLUMED: 1 0.003708 0.003708 0.003708 0.003708
PLUMED: 1 Prepare dependencies 1 0.000002 0.000002 0.000002 0.000002
PLUMED: 2 Sharing data 1 0.000823 0.000823 0.000823 0.000823
PLUMED: 3 Waiting for data 1 0.000002 0.000002 0.000002 0.000002
PLUMED: 4 Calculating (forward loop) 1 0.001358 0.001358 0.001358 0.001358
terminate called after throwing an instance of 'PLMD::Plumed::Exception'
what():
+++ PLUMED error
+++ at Action.cpp:242, function void PLMD::Action::error(const string&) const
+++ message follows +++
ERROR in input to action COM with label com1 : You are trying to compute a CENTER or COM but masses are not known.
If you are using plumed driver, please use the --mc option
./each-bias-potn-value.sh: line 3: 35180 Aborted (core dumped) plumed driver --mf_xtc alltraj.xtc --trajectory-stride=10 --plumed plumed.dat
[iit@localhost final-plumed-file]$
#####################################################################################
I can't understand why this error comes for every 20 file.
It will be helpful for any suggestion .
Thanks