# Created by charmm2lammps v1.9.1 on Mon 13 Dec 2021 12:44:15 AM +0330 # Command: charmm2lammps.pl all27_prot_lipid water1_autopsf echo both units real boundary p p p neigh_modify delay 2 every 1 timestep 1 atom_style full bond_style harmonic angle_style harmonic read_data config.data bond_style harmonic bond_coeff 2 469.0 1.0 #H-O bond_coeff 1 450.0 1.418 #C-C angle_style harmonic angle_coeff 1 85.0 109.47 #H-O-H #angle_coeff 2 55.0 109.47 #C-C-C set type 1 charge 0.4238 set type 2 charge -0.8476 pair_style lj/charmm/coul/long 8.0 10.0 pair_coeff 1 1 0.0 0.0 #H-H pair_coeff 2 2 0.1553 3.166 #O-O pair_coeff 3 3 0.07 3.9848 #C-C pair_coeff 1 2 0.0 0.0 #H-O pair_coeff 1 3 0.0 1.9924 #H-C pair_coeff 2 3 0.104264 3.5754 #O-C #pair_modify mix arithmetic kspace_style pppm 1e-4 #kspace_style pppm/tip4p 1e-4 neighbor 2 bin neigh_modify exclude type 3 3 neigh_modify delay 0 every 1 check yes group H2O type 1 2 fix NVT all nvt temp 298.0 298.0 100 #Apply Nose-Hoover termostate on water molecules fix rigid all shake 1.0e-6 500 0 m 1.0 a 1 velocity all create 298.0 12345678 dist uniform #Apply Nose-Hoover termostate on water molecules group waterbox id <> 1 11763 group sheet1 id <> 11764 12771 group sheet2 id <> 12772 13779 group g_all union sheet1 sheet2 velocity g_all set 0 0 0 units box fix NOFORCE2 g_all setforce 0 0 0 thermo 1000 thermo_style custom step temp pe ke etotal log logequi1.txt dump 1 all custom 10000 dump.lammpstrj id type x y z run 50000 #####################################3 undump 1 reset_timestep 0 variable p equal 100 #Correlation Length variable s equal 10 #sample interval variable d equal $p*$s #dump interval # Convert from LAMMPS real units to SI variable kB equal 1.3806504e-23 #[J/K] Boltzmann variable atm2Pa equal 101325.0 variable A2m equal 1.0e-10 variable fs2s equal 1.0e-15 variable convert equal ${atm2Pa}*${atm2Pa}*${fs2s}*${A2m}*${A2m}*${A2m} compute press waterbox stress/atom NULL compute ptensor waterbox reduce sum c_press[1] c_press[2] c_press[3] & c_press[4] c_press[5] c_press[6] variable pmxx equal c_ptensor[1] variable pmyy equal c_ptensor[2] variable pmzz equal c_ptensor[3] variable pmxy equal c_ptensor[4] variable pmxz equal c_ptensor[5] variable pmyz equal c_ptensor[6] variable plxy equal pxy variable plxz equal pxz variable plyz equal pyz variable plxx equal pxx #pxx variable plyy equal pyy #pyy variable plzz equal pzz #pzz variable plxxyy equal (pxx-pyy)/2 variable plyyzz equal (pyy-pzz)/2 fix SS waterbox ave/correlate $s $p $d & v_plxy v_plxz v_plyz v_plxxyy v_plyyzz type auto file S0St.dat ave running variable T equal 300 variable vol equal 150000 variable dt equal 1 variable scale equal ${convert}/(${kB}*$T)*${vol}*$s*${dt} variable v11 equal trap(f_SS[3])*${scale} variable v22 equal trap(f_SS[4])*${scale} variable v33 equal trap(f_SS[5])*${scale} variable v12 equal trap(f_SS[6])*${scale} variable v23 equal trap(f_SS[7])*${scale} thermo 1000 thermo_style custom step temp press v_v11 v_v22 v_v33 v_v12 v_v23 v_pmxx v_pmyy v_pmzz v_pmxy v_pmxz v_pmyz log logequi2.txt dump 2 all custom 1000 dump2.lammpstrj id type x y z run 50000 variable visco equal (v_v11+v_v22+v_v33+v_v12+v_v23)/5.0 variable counting equal count(all) variable ndens equal count(all)/vol print "average viscosity : ${visco} [Pa.s] @ $T K, ${ndens}/A^3}, count: ${counting}"