Commit 3acb09e3 authored by Oliver Henrich's avatar Oliver Henrich
Browse files

Corrected virial, altered calculation of stacking strength

parent 0a90032b
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -23,9 +23,11 @@ style1 = {hybrid/overlay oxdna/excv oxdna/stk oxdna/hbond oxdna/xstk oxdna/coaxs
style2 = {oxdna/excv} or {oxdna/stk} or {oxdna/hbond} or {oxdna/xstk} or {oxdna/coaxstk}
args = list of arguments for these particular styles :ul

  {oxdna/stk} args = seq T 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
  {oxdna/stk} args = seq T xi kappa 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
    seq = seqav (for average sequence stacking strength) or seqdep (for sequence-dependent stacking strength)
    T = temperature (oxDNA units, 0.1 = 300 K)
    xi = temperature-independent coefficient in stacking strength
    kappa = coefficient of linear temperature dependence in stacking strength
  {oxdna/hbond} args = seq eps 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
    seq = seqav (for average sequence base-pairing strength) or seqdep (for sequence-dependent base-pairing strength)
    eps = 1.077 (between base pairs A-T and C-G) or 0 (all other pairs) :pre
@@ -34,7 +36,7 @@ args = list of arguments for these particular styles :ul

pair_style hybrid/overlay oxdna/excv oxdna/stk oxdna/hbond oxdna/xstk oxdna/coaxstk
pair_coeff * * oxdna/excv    2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna/stk     seqdep 0.1 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna/stk     seqdep 0.1 1.3448 2.6568 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna/hbond   seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna/hbond   seqdep 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna/hbond   seqdep 1.077 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
@@ -62,7 +64,7 @@ NOTE: These pair styles have to be used together with the related oxDNA bond sty
{oxdna/fene} for the connectivity of the phosphate backbone (see also documentation of
"bond_style oxdna/fene"_bond_oxdna.html). Most of the coefficients
in the above example have to be kept fixed and cannot be changed without reparameterizing the entire model.
Exceptions are the first and second coefficient after {oxdna/stk} (seq=seqdep and T=0.1 in the above example)
Exceptions are the first four coefficients after {oxdna/stk} (seq=seqdep, T=0.1, xi=1.3448 and kappa=2.6568 in the above example)
and the first coefficient after {oxdna/hbond} (seq=seqdep in the above example).
When using a Langevin thermostat, e.g. through "fix langevin"_fix_langevin.html
or "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html
+7 −5
Original line number Diff line number Diff line
@@ -24,10 +24,12 @@ style1 = {hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/
style2 = {oxdna2/excv} or {oxdna2/stk} or {oxdna2/hbond} or {oxdna2/xstk} or {oxdna2/coaxstk} or {oxdna2/dh}
args = list of arguments for these particular styles :ul

  {oxdna2/stk} args = seq T 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
  {oxdna2/stk} args = seq T xi kappa 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
    seq = seqav (for average sequence stacking strength) or seqdep (for sequence-dependent stacking strength)
    T = temperature (oxDNA units, 0.1 = 300 K)
  {oxdna/hbond} args = seq eps 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
    xi = temperature-independent coefficient in stacking strength 
    kappa = coefficient of linear temperature dependence in stacking strength 
  {oxdna2/hbond} args = seq eps 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
    seq = seqav (for average sequence base-pairing strength) or seqdep (for sequence-dependent base-pairing strength)
    eps = 1.0678 (between base pairs A-T and C-G) or 0 (all other pairs)
  {oxdna2/dh} args = T rhos qeff
@@ -39,7 +41,7 @@ args = list of arguments for these particular styles :ul

pair_style hybrid/overlay oxdna2/excv oxdna2/stk oxdna2/hbond oxdna2/xstk oxdna2/coaxstk oxdna2/dh
pair_coeff * * oxdna2/excv    2.0 0.7 0.675 2.0 0.515 0.5 2.0 0.33 0.32
pair_coeff * * oxdna2/stk     seqdep 0.1 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/stk     seqdep 0.1 1.3523 2.6717 6.0 0.4 0.9 0.32 0.6 1.3 0 0.8 0.9 0 0.95 0.9 0 0.95 2.0 0.65 2.0 0.65
pair_coeff * * oxdna2/hbond   seqdep 0.0 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 1 4 oxdna2/hbond   seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
pair_coeff 2 3 oxdna2/hbond   seqdep 1.0678 8.0 0.4 0.75 0.34 0.7 1.5 0 0.7 1.5 0 0.7 1.5 0 0.7 0.46 3.141592653589793 0.7 4.0 1.5707963267948966 0.45 4.0 1.5707963267948966 0.45
@@ -68,8 +70,8 @@ NOTE: These pair styles have to be used together with the related oxDNA2 bond st
{oxdna2/fene} for the connectivity of the phosphate backbone (see also documentation of
"bond_style oxdna2/fene"_bond_oxdna.html). Most of the coefficients
in the above example have to be kept fixed and cannot be changed without reparameterizing the entire model.
Exceptions are the first and the second coefficient after {oxdna2/stk} (seq=seqdep and T=0.1 in the above example),
the first coefficient after {oxdna/hbond} (seq=seqdep in the above example) and the three coefficients
Exceptions are the first four coefficients after {oxdna2/stk} (seq=seqdep, T=0.1, xi=1.3523 and kappa=2.6717 in the above example),
the first coefficient after {oxdna2/hbond} (seq=seqdep in the above example) and the three coefficients
after {oxdna2/dh} (T=0.1, rhos=1.0, qeff=0.815 in the above example). When using a Langevin thermostat
e.g. through "fix langevin"_fix_langevin.html or "fix nve/dotc/langevin"_fix_nve_dotc_langevin.html
the temperature coefficients have to be matched to the one used in the fix.
+2 −2
Original line number Diff line number Diff line
@@ -37,8 +37,8 @@ BondOxdna2Fene::~BondOxdna2Fene()
/* ----------------------------------------------------------------------
    compute vector COM-sugar-phosphate backbone interaction site in oxDNA2
------------------------------------------------------------------------- */
void BondOxdna2Fene::compute_interaction_sites(double e1[3],
  double e2[3], double r[3])
void BondOxdna2Fene::compute_interaction_sites(double e1[3], double e2[3],
  double /*e3*/[3], double r[3])
{
  double d_cs_x=-0.34, d_cs_y=+0.3408;

+2 −1
Original line number Diff line number Diff line
@@ -28,7 +28,8 @@ class BondOxdna2Fene : public BondOxdnaFene {
 public:
  BondOxdna2Fene(class LAMMPS *);
  virtual ~BondOxdna2Fene();
  virtual void compute_interaction_sites(double *, double *, double *);
  virtual void compute_interaction_sites(double *, double *, double *,
    double *);
};

}
+93 −5
Original line number Diff line number Diff line
@@ -55,8 +55,8 @@ BondOxdnaFene::~BondOxdnaFene()
/* ----------------------------------------------------------------------
    compute vector COM-sugar-phosphate backbone interaction site in oxDNA
------------------------------------------------------------------------- */
void BondOxdnaFene::compute_interaction_sites(double e1[3],
  double /*e2*/[3], double r[3])
void BondOxdnaFene::compute_interaction_sites(double e1[3], double /*e2*/[3],
  double /*e3*/[3], double r[3])
{
  double d_cs=-0.4;

@@ -66,6 +66,90 @@ void BondOxdnaFene::compute_interaction_sites(double e1[3],

}

/* ----------------------------------------------------------------------
   tally energy and virial into global and per-atom accumulators
------------------------------------------------------------------------- */

void BondOxdnaFene::ev_tally_xyz(int i, int j, int nlocal, int newton_bond,
                    double ebond,
                    double fx, double fy, double fz,
                    double delx, double dely, double delz)
{
  double ebondhalf,v[6];

  if (eflag_either) {
    if (eflag_global) {
      if (newton_bond) energy += ebond;
      else {
        ebondhalf = 0.5*ebond;
        if (i < nlocal) energy += ebondhalf;
        if (j < nlocal) energy += ebondhalf;
      }
    }
    if (eflag_atom) {
      ebondhalf = 0.5*ebond;
      if (newton_bond || i < nlocal) eatom[i] += ebondhalf;
      if (newton_bond || j < nlocal) eatom[j] += ebondhalf;
    }
  }

  if (vflag_either) {
    v[0] = delx*fx;
    v[1] = dely*fy;
    v[2] = delz*fz;
    v[3] = delx*fy;
    v[4] = delx*fz;
    v[5] = dely*fz;

    if (vflag_global) {
      if (newton_bond) {
        virial[0] += v[0];
        virial[1] += v[1];
        virial[2] += v[2];
        virial[3] += v[3];
        virial[4] += v[4];
        virial[5] += v[5];
      } else {
        if (i < nlocal) {
          virial[0] += 0.5*v[0];
          virial[1] += 0.5*v[1];
          virial[2] += 0.5*v[2];
          virial[3] += 0.5*v[3];
          virial[4] += 0.5*v[4];
          virial[5] += 0.5*v[5];
        }
        if (j < nlocal) {
          virial[0] += 0.5*v[0];
          virial[1] += 0.5*v[1];
          virial[2] += 0.5*v[2];
          virial[3] += 0.5*v[3];
          virial[4] += 0.5*v[4];
          virial[5] += 0.5*v[5];
        }
      }
    }

    if (vflag_atom) {
      if (newton_bond || i < nlocal) {
        vatom[i][0] += 0.5*v[0];
        vatom[i][1] += 0.5*v[1];
        vatom[i][2] += 0.5*v[2];
        vatom[i][3] += 0.5*v[3];
        vatom[i][4] += 0.5*v[4];
        vatom[i][5] += 0.5*v[5];
      }
      if (newton_bond || j < nlocal) {
        vatom[j][0] += 0.5*v[0];
        vatom[j][1] += 0.5*v[1];
        vatom[j][2] += 0.5*v[2];
        vatom[j][3] += 0.5*v[3];
        vatom[j][4] += 0.5*v[4];
        vatom[j][5] += 0.5*v[5];
      }
    }
  }
}

/* ----------------------------------------------------------------------
   compute function for oxDNA FENE-bond interaction
   s=sugar-phosphate backbone site, b=base site, st=stacking site
@@ -112,8 +196,8 @@ void BondOxdnaFene::compute(int eflag, int vflag)
    MathExtra::q_to_exyz(qb,bx,by,bz);

    // vector COM-backbone site a and b
    compute_interaction_sites(ax,ay,ra_cs);
    compute_interaction_sites(bx,by,rb_cs);
    compute_interaction_sites(ax,ay,az,ra_cs);
    compute_interaction_sites(bx,by,bz,rb_cs);

    // vector backbone site b to a
    delr[0] = x[a][0] + ra_cs[0] - x[b][0] - rb_cs[0];
@@ -182,7 +266,11 @@ void BondOxdnaFene::compute(int eflag, int vflag)
    }

    // increment energy and virial
    if (evflag) ev_tally(a,b,nlocal,newton_bond,ebond,fbond,delr[0],delr[1],delr[2]);
    // NOTE: The virial is calculated on the 'molecular' basis.
    // (see G. Ciccotti and J.P. Ryckaert, Comp. Phys. Rep. 4, 345-392 (1986))

    if (evflag) ev_tally_xyz(a,b,nlocal,newton_bond,ebond,
        delf[0],delf[1],delf[2],x[a][0]-x[b][0],x[a][1]-x[b][1],x[a][2]-x[b][2]);

  }

Loading