Commit be4734bd authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

Version 30 Sep 2016

parents 2551619b e2c7acab
Loading
Loading
Loading
Loading
+22.7 KiB (544 KiB)

File changed.

No diff preview for this file type.

+2 −1
Original line number Diff line number Diff line
# Title: charmm correction map
# DATE: 2016-09-26 CONTRIBUTOR: Robert Latour, latourr@clemson.edu  CITATION: TBA
# Title: charmm22/charmm27 dihedral correction map

#  alanine map, type 1

+1 −1
Original line number Diff line number Diff line
Run this example as:

mpirun -np 3 lmp_linux -partition 3x1 -in in.tad
mpirun -np 3 lmp_g++ -partition 3x1 -in in.tad

You should be able to use any number of replicas >= 3.
+26 −28
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ colvar::colvar(std::string const &conf)
    feature_states[f_cv_linear]->enabled = lin;
  }

  // Colvar is homogeneous iff:
  // Colvar is homogeneous if:
  // - it is linear (hence not scripted)
  // - all cvcs have coefficient 1 or -1
  // i.e. sum or difference of cvcs
@@ -375,28 +375,16 @@ colvar::colvar(std::string const &conf)

  {
    bool temp;
    if (get_keyval(conf, "outputSystemForce", temp, false)) {
      cvm::error("Colvar option outputSystemForce is deprecated.\n"
        "Please use outputTotalForce, or outputSystemForce within an ABF bias.");
    if (get_keyval(conf, "outputSystemForce", temp, false, colvarparse::parse_silent)) {
      cvm::error("Option outputSystemForce is deprecated: only outputTotalForce is supported instead.\n"
                 "The two are NOT identical: see http://colvars.github.io/totalforce.html.\n", INPUT_ERROR);
      return;
    }
  }

  {
    bool b_output_total_force;
    get_keyval(conf, "outputTotalForce", b_output_total_force, false);
    if (b_output_total_force) {
      enable(f_cv_output_total_force);
    }
  }

  {
    bool b_output_applied_force;
    get_keyval(conf, "outputAppliedForce", b_output_applied_force, false);
    if (b_output_applied_force) {
      enable(f_cv_output_applied_force);
    }
  }
  get_keyval_feature(this, conf, "outputTotalForce", f_cv_output_total_force, false);
  get_keyval_feature(this, conf, "outputAppliedForce", f_cv_output_applied_force, false);
  get_keyval_feature(this, conf, "subtractAppliedForce", f_cv_subtract_applied_force, false);

  // Start in active state by default
  enable(f_cv_active);
@@ -409,6 +397,8 @@ colvar::colvar(std::string const &conf)
  fj.type(value());
  ft.type(value());
  ft_reported.type(value());
  f_old.type(value());
  f_old.reset();

  if (cvm::b_analysis)
    parse_analysis(conf);
@@ -519,6 +509,8 @@ int colvar::init_components(std::string const &conf)
    "number", "coordNum");
  error_code |= init_components_type<selfcoordnum>(conf, "self-coordination "
    "number", "selfCoordNum");
  error_code |= init_components_type<groupcoordnum>(conf, "group-coordination "
    "number", "groupCoord");
  error_code |= init_components_type<angle>(conf, "angle", "angle");
  error_code |= init_components_type<dipole_angle>(conf, "dipole angle", "dipoleAngle");
  error_code |= init_components_type<dihedral>(conf, "dihedral", "dihedral");
@@ -1104,6 +1096,14 @@ int colvar::calc_colvar_properties()

  } else {

    if (is_enabled(f_cv_subtract_applied_force)) {
      // correct the total force only if it has been measured
      // TODO add a specific test instead of relying on sq norm
      if (ft.norm2() > 0.0) {
        ft -= f_old;
      }
    }

    x_reported = x;
    ft_reported = ft;
  }
@@ -1210,6 +1210,10 @@ cvm::real colvar::update_forces_energy()
    x_old = x;
  }

  if (is_enabled(f_cv_subtract_applied_force)) {
    f_old = f;
  }

  if (cvm::debug())
    cvm::log("Done updating colvar \""+this->name+"\".\n");
  return (potential_energy + kinetic_energy);
@@ -1640,15 +1644,9 @@ std::ostream & colvar::write_traj(std::ostream &os)
  }

  if (is_enabled(f_cv_output_applied_force)) {
    if (is_enabled(f_cv_extended_Lagrangian)) {
    os << " "
       << std::setprecision(cvm::cv_prec) << std::setw(cvm::cv_width)
         << fr;
    } else {
      os << " "
         << std::setprecision(cvm::cv_prec) << std::setw(cvm::cv_width)
         << f;
    }
       << applied_force();
  }

  return os;
+10 −3
Original line number Diff line number Diff line
@@ -175,6 +175,9 @@ public:
  /// (if defined) contribute to it
  colvarvalue f;

  /// Applied force at the previous step (to be subtracted from total force if needed)
  colvarvalue f_old;

  /// \brief Total force, as derived from the atomic trajectory;
  /// should equal the system force plus \link f \endlink
  colvarvalue ft;
@@ -272,10 +275,13 @@ public:
  /// \brief Calculate the quantities associated to the colvar (but not to the CVCs)
  int calc_colvar_properties();

  /// Get the current biasing force
  inline colvarvalue bias_force() const
  /// Get the current applied force
  inline colvarvalue const applied_force() const
  {
    return fb;
    if (is_enabled(f_cv_extended_Lagrangian)) {
      return fr;
    }
    return f;
  }

  /// Set the total biasing force to zero
@@ -482,6 +488,7 @@ public:
  class dihedral;
  class coordnum;
  class selfcoordnum;
  class groupcoordnum;
  class h_bond;
  class rmsd;
  class orientation_angle;
Loading