Commit 4d5635a3 authored by Gareth Tribello's avatar Gareth Tribello
Browse files

Fixed virial contribution from PLUMED

parent c84ae38e
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -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
+0 −40
Original line number Diff line number Diff line
# 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
+0 −3
Original line number Diff line number Diff line
v: VOLUME 
r: MOVINGRESTRAINT ARG=v KAPPA0=100. AT0=20 AT1=30 STEP0=0 STEP1=100
PRINT ARG=v,r.* FILE=expanding
+1 −1
Original line number Diff line number Diff line
vv: VOLUME
PRINT ARG=vv FILE=plmd_volume_without_restraint
PRINT ARG=vv FILE=plmd_volume_without_restraint FMT=%8.5f
+1 −1
Original line number Diff line number Diff line
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
Loading