enforce that CHARMM dihedral styles are run at the same r-RESPA level as pair
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
#include <mpi.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "dihedral_charmm.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
@ -26,6 +27,7 @@
|
||||
#include "force.h"
|
||||
#include "pair.h"
|
||||
#include "update.h"
|
||||
#include "respa.h"
|
||||
#include "math_const.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
@ -368,6 +370,16 @@ void DihedralCharmm::coeff(int narg, char **arg)
|
||||
|
||||
void DihedralCharmm::init_style()
|
||||
{
|
||||
if (strstr(update->integrate_style,"respa")) {
|
||||
Respa *r = (Respa *) update->integrate;
|
||||
if (r->level_pair >= 0 && (r->level_pair != r->level_dihedral))
|
||||
error->all(FLERR,"Dihedral style charmm must be set to same"
|
||||
" r-RESPA level as 'pair'");
|
||||
if (r->level_outer >= 0 && (r->level_outer != r->level_dihedral))
|
||||
error->all(FLERR,"Dihedral style charmm must be set to same"
|
||||
" r-RESPA level as 'outer'");
|
||||
}
|
||||
|
||||
// insure use of CHARMM pair_style if any weight factors are non-zero
|
||||
// set local ptrs to LJ 14 arrays setup by Pair
|
||||
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
#include <mpi.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "dihedral_charmmfsw.h"
|
||||
#include "atom.h"
|
||||
#include "comm.h"
|
||||
@ -29,6 +30,7 @@
|
||||
#include "force.h"
|
||||
#include "pair.h"
|
||||
#include "update.h"
|
||||
#include "respa.h"
|
||||
#include "math_const.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
@ -386,6 +388,16 @@ void DihedralCharmmfsw::coeff(int narg, char **arg)
|
||||
|
||||
void DihedralCharmmfsw::init_style()
|
||||
{
|
||||
if (strstr(update->integrate_style,"respa")) {
|
||||
Respa *r = (Respa *) update->integrate;
|
||||
if (r->level_pair >= 0 && (r->level_pair != r->level_dihedral))
|
||||
error->all(FLERR,"Dihedral style charmmfsw must be set to same"
|
||||
" r-RESPA level as 'pair'");
|
||||
if (r->level_outer >= 0 && (r->level_outer != r->level_dihedral))
|
||||
error->all(FLERR,"Dihedral style charmmfsw must be set to same"
|
||||
" r-RESPA level as 'outer'");
|
||||
}
|
||||
|
||||
// insure use of CHARMM pair_style if any weight factors are non-zero
|
||||
// set local ptrs to LJ 14 arrays setup by Pair
|
||||
|
||||
|
||||
Reference in New Issue
Block a user