Updating fep examples

This commit is contained in:
Agilio Padua
2021-02-15 13:34:22 +01:00
parent 0c35981e31
commit 7584fbb28f
9 changed files with 12245 additions and 12911 deletions

File diff suppressed because it is too large Load Diff

View File

@ -32,28 +32,24 @@ pair_coeff 4 4 lj/cut/coul/long 0.0000 1.0000 # Hw Hw
pair_coeff 4 5 lj/cut/coul/long 0.0000 1.7792 # Hw Ow pair_coeff 4 5 lj/cut/coul/long 0.0000 1.7792 # Hw Ow
pair_coeff 5 5 lj/cut/coul/long 0.1554 3.1655 # Ow Ow pair_coeff 5 5 lj/cut/coul/long 0.1554 3.1655 # Ow Ow
variable nsteps equal 500000
variable nprint equal ${nsteps}/500
variable ndump equal ${nsteps}/100
# variable nrestart equal ${nsteps}/10
variable temp equal 300.0 variable temp equal 300.0
variable press equal 1.0 variable press equal 1.0
neighbor 2.0 bin neighbor 2.0 bin
timestep 2.0 timestep 1.0
velocity all create ${temp} 12345 velocity all create ${temp} 12345
thermo_style multi fix SHAKE all shake 0.0001 20 0 b 3 a 4
thermo ${nprint}
fix fSHAKE all shake 0.0001 20 ${nprint} b 3 a 4 fix NPT all npt temp ${temp} ${temp} 100 iso ${press} ${press} 500
fix fNPT all npt temp ${temp} ${temp} 100 iso ${press} ${press} 500 thermo_style custom step cpu etotal ke pe evdwl ecoul elong temp press vol density
thermo 1000
run 200000 run 200000
reset_timestep 0 reset_timestep 0
variable dlambda equal 1.0 variable dlambda equal 1.0
@ -62,28 +58,19 @@ variable dqC equal 0.48*v_dlambda-0.24*(1.0-v_dlambda)
variable dqH equal 0.06*(1.0-v_dlambda) variable dqH equal 0.06*(1.0-v_dlambda)
variable dqF equal -0.12*v_dlambda variable dqF equal -0.12*v_dlambda
compute cFEP all fep ${temp} & compute FEP all fep ${temp} &
pair lj/cut/coul/long/soft lambda 2 4*5 v_minusdl & pair lj/cut/coul/long/soft lambda 2 4*5 v_minusdl &
pair lj/cut/coul/long/soft lambda 3 4*5 v_dlambda & pair lj/cut/coul/long/soft lambda 3 4*5 v_dlambda &
atom charge 1 v_dqC & atom charge 1 v_dqC &
atom charge 2 v_dqH & atom charge 2 v_dqH &
atom charge 3 v_dqF atom charge 3 v_dqF
fix fFEP all ave/time 1 1 100 c_cFEP[1] c_cFEP[2] file bar01.lmp fix FEP all ave/time 1 1 100 c_FEP[1] c_FEP[2] file bar01.fep
dump TRAJ all custom 5000 dump.lammpstrj id mol type element xu yu zu
dump_modify TRAJ element C H F H O
# compute cRDF all rdf 100 1 1 run 500000
# fix fRDF all ave/time 20 100 ${nsteps} c_cRDF file rdf.lammps mode vector
# compute cMSD all msd
# fix fMSD all ave/time 1 1 ${ndump} c_cMSD[1] c_cMSD[2] c_cMSD[3] c_cMSD[4] file msd.lammps
dump dCONF all custom ${ndump} dump.lammpstrj id mol type element x y z ix iy iz
dump_modify dCONF element C H F H O
# restart ${nrestart} restart.*.lmp
run ${nsteps}
# write_restart restart.*.lmp # write_restart restart.*.lmp
write_data data.*.lmp write_data data.*.lmp

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -32,28 +32,24 @@ pair_coeff 4 4 lj/cut/coul/long 0.0000 1.0000 # Hw Hw
pair_coeff 4 5 lj/cut/coul/long 0.0000 1.7792 # Hw Ow pair_coeff 4 5 lj/cut/coul/long 0.0000 1.7792 # Hw Ow
pair_coeff 5 5 lj/cut/coul/long 0.1554 3.1655 # Ow Ow pair_coeff 5 5 lj/cut/coul/long 0.1554 3.1655 # Ow Ow
variable nsteps equal 500000
variable nprint equal ${nsteps}/500
variable ndump equal ${nsteps}/100
# variable nrestart equal ${nsteps}/10
variable temp equal 300.0 variable temp equal 300.0
variable press equal 1.0 variable press equal 1.0
neighbor 2.0 bin neighbor 2.0 bin
timestep 2.0 timestep 1.0
velocity all create ${temp} 12345 velocity all create ${temp} 12345
thermo_style multi fix SHAKE all shake 0.0001 20 0 b 3 a 4
thermo ${nprint}
fix fSHAKE all shake 0.0001 20 ${nprint} b 3 a 4 fix NPT all npt temp ${temp} ${temp} 100 iso ${press} ${press} 500
fix fNPT all npt temp ${temp} ${temp} 100 iso ${press} ${press} 500 thermo_style custom step cpu etotal ke pe evdwl ecoul elong temp press vol density
thermo 1000
run 200000 run 200000
reset_timestep 0 reset_timestep 0
variable dlambda equal 1.0 variable dlambda equal 1.0
@ -62,28 +58,19 @@ variable dqC equal -0.24*v_dlambda+0.48*(1.0-v_dlambda)
variable dqH equal 0.06*v_dlambda variable dqH equal 0.06*v_dlambda
variable dqF equal -0.12*(1.0-v_dlambda) variable dqF equal -0.12*(1.0-v_dlambda)
compute cFEP all fep ${temp} & compute FEP all fep ${temp} &
pair lj/cut/coul/long/soft lambda 2 4*5 v_dlambda & pair lj/cut/coul/long/soft lambda 2 4*5 v_dlambda &
pair lj/cut/coul/long/soft lambda 3 4*5 v_minusdl & pair lj/cut/coul/long/soft lambda 3 4*5 v_minusdl &
atom charge 1 v_dqC & atom charge 1 v_dqC &
atom charge 2 v_dqH & atom charge 2 v_dqH &
atom charge 3 v_dqF atom charge 3 v_dqF
fix fFEP all ave/time 1 1 100 c_cFEP[1] c_cFEP[2] file bar10.lmp fix FEP all ave/time 1 1 100 c_FEP[1] c_FEP[2] file bar10.fep
dump TRAJ all custom 5000 dump.lammpstrj id mol type element xu yu zu
dump_modify TRAJ element C H F H O
# compute cRDF all rdf 100 1 1 run 500000
# fix fRDF all ave/time 20 100 ${nsteps} c_cRDF file rdf.lammps mode vector
# compute cMSD all msd
# fix fMSD all ave/time 1 1 ${ndump} c_cMSD[1] c_cMSD[2] c_cMSD[3] c_cMSD[4] file msd.lammps
dump dCONF all custom ${ndump} dump.lammpstrj id mol type element x y z ix iy iz
dump_modify dCONF element C H F H O
# restart ${nrestart} restart.*.lmp
run ${nsteps}
# write_restart restart.*.lmp # write_restart restart.*.lmp
write_data data.*.lmp write_data data.*.lmp

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
Contributing author: Agilio Padua (Univ Blaise Pascal & CNRS) Contributing author: Agilio Padua (ENS de Lyon & CNRS)
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include "compute_fep.h" #include "compute_fep.h"
@ -264,10 +264,11 @@ void ComputeFEP::init()
for (int m = 0; m < npert; m++) { for (int m = 0; m < npert; m++) {
Perturb *pert = &perturb[m]; Perturb *pert = &perturb[m];
if (pert->which == PAIR) if (pert->which == PAIR)
fprintf(screen, " %s %s %d-%d %d-%d\n", pert->pstyle, pert->pparam, fprintf(screen, " pair %s %s %d-%d %d-%d\n", pert->pstyle,
pert->pparam,
pert->ilo, pert->ihi, pert->jlo, pert->jhi); pert->ilo, pert->ihi, pert->jlo, pert->jhi);
else if (pert->which == ATOM) else if (pert->which == ATOM)
fprintf(screen, " %d-%d charge\n", pert->ilo, pert->ihi); fprintf(screen, " atom charge %d-%d\n", pert->ilo, pert->ihi);
} }
} }
if (logfile) { if (logfile) {
@ -277,10 +278,11 @@ void ComputeFEP::init()
for (int m = 0; m < npert; m++) { for (int m = 0; m < npert; m++) {
Perturb *pert = &perturb[m]; Perturb *pert = &perturb[m];
if (pert->which == PAIR) if (pert->which == PAIR)
fprintf(logfile, " %s %s %d-%d %d-%d\n", pert->pstyle, pert->pparam, fprintf(logfile, " pair %s %s %d-%d %d-%d\n", pert->pstyle,
pert->pparam,
pert->ilo, pert->ihi, pert->jlo, pert->jhi); pert->ilo, pert->ihi, pert->jlo, pert->jhi);
else if (pert->which == ATOM) else if (pert->which == ATOM)
fprintf(logfile, " %d-%d charge\n", pert->ilo, pert->ihi); fprintf(logfile, " atom charge %d-%d\n", pert->ilo, pert->ihi);
} }
} }
} }

View File

@ -12,7 +12,7 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
Contributing author: Agilio Padua (ICCF,UBP,CNRS) Contributing author: Agilio Padua (ENS de Lyon & CNRS)
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#ifdef COMPUTE_CLASS #ifdef COMPUTE_CLASS

View File

@ -12,7 +12,7 @@
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
/* ---------------------------------------------------------------------- /* ----------------------------------------------------------------------
Charges by type and after option: Agilio Padua (Univ Blaise Pascal & CNRS) Charges by type and after option: Agilio Padua (ENS de Lyon & CNRS)
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#include "fix_adapt_fep.h" #include "fix_adapt_fep.h"