diff --git a/examples/USER/plumed/check-plumed.sh b/examples/USER/plumed/check-plumed.sh index 720bc34400..0dadc96f41 100755 --- a/examples/USER/plumed/check-plumed.sh +++ b/examples/USER/plumed/check-plumed.sh @@ -67,15 +67,17 @@ if [ "$nlines" -gt 0 ] ; then echo ERROR passing forces from PLUMED back to LAMMPS fi -# Nothing from here works - -# Now try to simply increase the size of the box by applying a moving restraint on the volume -$LAMMPS < in.peptide-plumed-expand - # Now run calculations to test virial $LAMMPS < in.peptide-plumed-npt $LAMMPS < in.peptide-plumed-npt2 +nlines=`paste plmd_volume_with_restraint plmd_volume_without_restraint | tail -n +2 | awk '{if( $2<$4-0.0001 || $2>$4+0.0001 ) print $0}' | wc -l` +if [ "$nlines" -gt 0 ] ; then + echo ERROR passing virial from PLUMED back to LAMMPS +fi + +# Nothing from here works + # Now run calculations to check forces on energy $LAMMPS < in.peptide-plumed-engforce-ref $LAMMPS < in.peptide-plumed-eng-force-plumed diff --git a/examples/USER/plumed/in.peptide-plumed-expand b/examples/USER/plumed/in.peptide-plumed-expand deleted file mode 100644 index ed70929ab6..0000000000 --- a/examples/USER/plumed/in.peptide-plumed-expand +++ /dev/null @@ -1,40 +0,0 @@ -# Solvated 5-mer peptide - -units real -atom_style full - -pair_style lj/charmm/coul/long 8.0 10.0 10.0 -bond_style harmonic -angle_style charmm -dihedral_style charmm -improper_style harmonic -kspace_style pppm 0.0001 - -read_data data.peptide - -neighbor 2.0 bin -neigh_modify delay 5 - -timestep 2.0 - -group peptide type <= 12 -group one id 2 4 5 6 -group two id 80 82 83 84 -group ref id 37 -group colvar union one two ref - -fix 1 all npt temp 275.0 275.0 100.0 iso 0.987 0.987 400.0 tchain 1 - -fix 2 all plumed plumedfile plumed-expand.dat outfile p.log - -#dump 1 colvar custom 1 dump.colvar.lammpstrj id xu yu zu fx fy fz -#dump_modify 1 sort id - -thermo_style custom step temp etotal pe ke epair ebond f_2 -thermo 10 -dump dd all xyz 10 lammps.xyz -variable step equal step -variable pe equal pe -dump mq all custom 200 mq_lammps id mass q - -run 101 diff --git a/examples/USER/plumed/plumed-expand.dat b/examples/USER/plumed/plumed-expand.dat deleted file mode 100644 index 29a8cf4182..0000000000 --- a/examples/USER/plumed/plumed-expand.dat +++ /dev/null @@ -1,3 +0,0 @@ -v: VOLUME -r: MOVINGRESTRAINT ARG=v KAPPA0=100. AT0=20 AT1=30 STEP0=0 STEP1=100 -PRINT ARG=v,r.* FILE=expanding diff --git a/examples/USER/plumed/plumed_npt.dat b/examples/USER/plumed/plumed_npt.dat index d41c41fa45..53579ac4ec 100644 --- a/examples/USER/plumed/plumed_npt.dat +++ b/examples/USER/plumed/plumed_npt.dat @@ -1,2 +1,2 @@ vv: VOLUME -PRINT ARG=vv FILE=plmd_volume_without_restraint +PRINT ARG=vv FILE=plmd_volume_without_restraint FMT=%8.5f diff --git a/examples/USER/plumed/plumed_npt2.dat b/examples/USER/plumed/plumed_npt2.dat index ea26ab3042..2074128cd0 100644 --- a/examples/USER/plumed/plumed_npt2.dat +++ b/examples/USER/plumed/plumed_npt2.dat @@ -1,3 +1,3 @@ vv: VOLUME RESTRAINT AT=0.0 ARG=vv SLOPE=-60.221429 -PRINT ARG=vv FILE=plmd_volume_with_restraint +PRINT ARG=vv FILE=plmd_volume_with_restraint FMT=%8.5f diff --git a/src/USER-PLUMED/fix_plumed.cpp b/src/USER-PLUMED/fix_plumed.cpp index 89115c4cce..d54b547862 100644 --- a/src/USER-PLUMED/fix_plumed.cpp +++ b/src/USER-PLUMED/fix_plumed.cpp @@ -138,6 +138,7 @@ FixPlumed::FixPlumed(LAMMPS *lmp, int narg, char **arg) : p->cmd("setTimestep",&dt); virial_flag=1; + thermo_virial=1; scalar_flag = 1; // This is the real initialization: