I have read that thread, but still cannot get how it works.
So I would be grateful if you could enlighten me…
I am using COMB potential.
Hence I am using fix qeq/comb.
I have prepared a cell with all charges equal to zero except 1 atom with charge +1, just to check.
I run the simulation with 1 step of CG (with zero steps turns out that no charge equilibration is performed),
and I get
TotEng Step Fmax E_vdwl E_coul E_long q1 q2 q3 qtot
-960.2194 0 0.46281597 -968.92244 8.7030403 0 0.010416667 0 0 1
-1002.4015 1 0.45350848 -978.01715 -24.384306 0 0.15562117 -0.15626975 -0.094006096 -1.5376589e-14
where at the beginning the total charge is 1 and then turns into zero after the equilibration.
From this data I deduce that fix/comb is imposing a zero net charge at the beginning of the charge equilibration …
I am using the Lammps version of 16th of February 2016.
What command/settings do I have to use to impose a constant net global charge to the system in fix/comb ?
Or do I have to use another, more recent version of Lammps ?
Portions of my inputs:
pair_style comb3 polar_off
fix 2 all qeq/comb 1.0 1e-3 verlet file fq.out 1 (should I remove verlet ?)
minimize 1.0e-20 1.0e-20 1 1
With this thermo style:
group type1 type 1
compute charge1 type1 property/atom q
compute q1 type1 reduce ave c_charge1
group type2 type 2
compute charge2 type2 property/atom q
compute q2 type2 reduce ave c_charge2
group type3 type 3
compute charge3 type3 property/atom q
compute q3 type3 reduce ave c_charge3
variable qtot equal count(type1)*c_q1+count(type2)*c_q2+count(type3)*c_q3
thermo_style custom etotal step fmax evdwl ecoul elong c_q1 c_q2 c_q3 v_qtot
Many thanks in advance for your help