Updating to develop
This commit is contained in:
2
src/.gitignore
vendored
2
src/.gitignore
vendored
@ -1502,6 +1502,8 @@
|
||||
/pair_dpd_fdt.h
|
||||
/pair_dpd_fdt_energy.cpp
|
||||
/pair_dpd_fdt_energy.h
|
||||
/pair_harmonic_cut.cpp
|
||||
/pair_harmonic_cut.h
|
||||
/pair_lennard_mdf.cpp
|
||||
/pair_lennard_mdf.h
|
||||
/pair_lj_cut_coul_long_cs.cpp
|
||||
|
||||
@ -30,12 +30,12 @@ class DumpAtomADIOS : public DumpAtom {
|
||||
|
||||
public:
|
||||
DumpAtomADIOS(class LAMMPS *, int, char **);
|
||||
virtual ~DumpAtomADIOS();
|
||||
~DumpAtomADIOS() override;
|
||||
|
||||
protected:
|
||||
virtual void openfile();
|
||||
virtual void write();
|
||||
virtual void init_style();
|
||||
void openfile() override;
|
||||
void write() override;
|
||||
void init_style() override;
|
||||
|
||||
private:
|
||||
DumpAtomADIOSInternal *internal;
|
||||
|
||||
@ -29,12 +29,12 @@ class DumpCustomADIOSInternal;
|
||||
class DumpCustomADIOS : public DumpCustom {
|
||||
public:
|
||||
DumpCustomADIOS(class LAMMPS *, int, char **);
|
||||
virtual ~DumpCustomADIOS();
|
||||
~DumpCustomADIOS() override;
|
||||
|
||||
protected:
|
||||
virtual void openfile();
|
||||
virtual void write();
|
||||
virtual void init_style();
|
||||
void openfile() override;
|
||||
void write() override;
|
||||
void init_style() override;
|
||||
|
||||
private:
|
||||
DumpCustomADIOSInternal *internal;
|
||||
|
||||
@ -34,18 +34,18 @@ class ReadADIOSInternal;
|
||||
class ReaderADIOS : public Reader {
|
||||
public:
|
||||
ReaderADIOS(class LAMMPS *);
|
||||
virtual ~ReaderADIOS();
|
||||
~ReaderADIOS() override;
|
||||
|
||||
virtual void settings(int, char **);
|
||||
void settings(int, char **) override;
|
||||
|
||||
virtual int read_time(bigint &);
|
||||
virtual void skip();
|
||||
virtual bigint read_header(double[3][3], int &, int &, int, int, int *, char **, int, int, int &,
|
||||
int &, int &, int &);
|
||||
virtual void read_atoms(int, int, double **);
|
||||
int read_time(bigint &) override;
|
||||
void skip() override;
|
||||
bigint read_header(double[3][3], int &, int &, int, int, int *, char **, int, int, int &,
|
||||
int &, int &, int &) override;
|
||||
void read_atoms(int, int, double **) override;
|
||||
|
||||
virtual void open_file(const char *);
|
||||
virtual void close_file();
|
||||
void open_file(const char *) override;
|
||||
void close_file() override;
|
||||
|
||||
private:
|
||||
int *fieldindex; // mapping of input fields to dump
|
||||
|
||||
@ -27,8 +27,8 @@ namespace LAMMPS_NS {
|
||||
class ComputeERotateAsphere : public Compute {
|
||||
public:
|
||||
ComputeERotateAsphere(class LAMMPS *, int, char **);
|
||||
void init();
|
||||
double compute_scalar();
|
||||
void init() override;
|
||||
double compute_scalar() override;
|
||||
|
||||
private:
|
||||
double pfactor;
|
||||
|
||||
@ -27,16 +27,16 @@ namespace LAMMPS_NS {
|
||||
class ComputeTempAsphere : public Compute {
|
||||
public:
|
||||
ComputeTempAsphere(class LAMMPS *, int, char **);
|
||||
~ComputeTempAsphere();
|
||||
void init();
|
||||
void setup();
|
||||
double compute_scalar();
|
||||
void compute_vector();
|
||||
~ComputeTempAsphere() override;
|
||||
void init() override;
|
||||
void setup() override;
|
||||
double compute_scalar() override;
|
||||
void compute_vector() override;
|
||||
|
||||
void remove_bias(int, double *);
|
||||
void restore_bias(int, double *);
|
||||
void remove_bias_thr(int, double *, double *);
|
||||
void restore_bias_thr(int, double *, double *);
|
||||
void remove_bias(int, double *) override;
|
||||
void restore_bias(int, double *) override;
|
||||
void remove_bias_thr(int, double *, double *) override;
|
||||
void restore_bias_thr(int, double *, double *) override;
|
||||
|
||||
private:
|
||||
int mode;
|
||||
|
||||
@ -21,16 +21,15 @@ namespace LAMMPS_NS {
|
||||
class FixNHAsphere : public FixNH {
|
||||
public:
|
||||
FixNHAsphere(class LAMMPS *, int, char **);
|
||||
virtual ~FixNHAsphere() {}
|
||||
void init();
|
||||
void init() override;
|
||||
|
||||
protected:
|
||||
double dtq;
|
||||
class AtomVecEllipsoid *avec;
|
||||
|
||||
void nve_v();
|
||||
void nve_x();
|
||||
void nh_v_temp();
|
||||
void nve_v() override;
|
||||
void nve_x() override;
|
||||
void nh_v_temp() override;
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -27,7 +27,6 @@ namespace LAMMPS_NS {
|
||||
class FixNPHAsphere : public FixNHAsphere {
|
||||
public:
|
||||
FixNPHAsphere(class LAMMPS *, int, char **);
|
||||
~FixNPHAsphere() {}
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -27,7 +27,6 @@ namespace LAMMPS_NS {
|
||||
class FixNPTAsphere : public FixNHAsphere {
|
||||
public:
|
||||
FixNPTAsphere(class LAMMPS *, int, char **);
|
||||
~FixNPTAsphere() {}
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -27,9 +27,9 @@ namespace LAMMPS_NS {
|
||||
class FixNVEAsphere : public FixNVE {
|
||||
public:
|
||||
FixNVEAsphere(class LAMMPS *, int, char **);
|
||||
void init();
|
||||
void initial_integrate(int);
|
||||
void final_integrate();
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
void final_integrate() override;
|
||||
|
||||
private:
|
||||
double dtq;
|
||||
|
||||
@ -27,8 +27,8 @@ namespace LAMMPS_NS {
|
||||
class FixNVEAsphereNoforce : public FixNVENoforce {
|
||||
public:
|
||||
FixNVEAsphereNoforce(class LAMMPS *, int, char **);
|
||||
void initial_integrate(int);
|
||||
void init();
|
||||
void initial_integrate(int) override;
|
||||
void init() override;
|
||||
|
||||
private:
|
||||
double dtq;
|
||||
|
||||
@ -27,11 +27,10 @@ namespace LAMMPS_NS {
|
||||
class FixNVELine : public FixNVE {
|
||||
public:
|
||||
FixNVELine(class LAMMPS *, int, char **);
|
||||
~FixNVELine() {}
|
||||
int setmask();
|
||||
void init();
|
||||
void initial_integrate(int);
|
||||
void final_integrate();
|
||||
int setmask() override;
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
void final_integrate() override;
|
||||
|
||||
private:
|
||||
double MINUSPI, TWOPI;
|
||||
|
||||
@ -27,11 +27,10 @@ namespace LAMMPS_NS {
|
||||
class FixNVETri : public FixNVE {
|
||||
public:
|
||||
FixNVETri(class LAMMPS *, int, char **);
|
||||
~FixNVETri() {}
|
||||
int setmask();
|
||||
void init();
|
||||
void initial_integrate(int);
|
||||
void final_integrate();
|
||||
int setmask() override;
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
void final_integrate() override;
|
||||
|
||||
private:
|
||||
double dtq;
|
||||
|
||||
@ -27,7 +27,6 @@ namespace LAMMPS_NS {
|
||||
class FixNVTAsphere : public FixNHAsphere {
|
||||
public:
|
||||
FixNVTAsphere(class LAMMPS *, int, char **);
|
||||
~FixNVTAsphere() {}
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -18,18 +18,18 @@
|
||||
|
||||
#include "pair_gayberne.h"
|
||||
|
||||
#include <cmath>
|
||||
#include "math_extra.h"
|
||||
#include "atom.h"
|
||||
#include "atom_vec_ellipsoid.h"
|
||||
#include "comm.h"
|
||||
#include "force.h"
|
||||
#include "neighbor.h"
|
||||
#include "neigh_list.h"
|
||||
#include "citeme.h"
|
||||
#include "memory.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
#include "math_extra.h"
|
||||
#include "memory.h"
|
||||
#include "neigh_list.h"
|
||||
#include "neighbor.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
|
||||
@ -27,18 +27,18 @@ namespace LAMMPS_NS {
|
||||
class PairGayBerne : public Pair {
|
||||
public:
|
||||
PairGayBerne(LAMMPS *lmp);
|
||||
virtual ~PairGayBerne();
|
||||
virtual void compute(int, int);
|
||||
virtual void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
virtual void init_style();
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
~PairGayBerne() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
|
||||
protected:
|
||||
enum { SPHERE_SPHERE, SPHERE_ELLIPSE, ELLIPSE_SPHERE, ELLIPSE_ELLIPSE };
|
||||
|
||||
@ -27,12 +27,12 @@ namespace LAMMPS_NS {
|
||||
class PairLineLJ : public Pair {
|
||||
public:
|
||||
PairLineLJ(class LAMMPS *);
|
||||
virtual ~PairLineLJ();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
virtual void init_style();
|
||||
double init_one(int, int);
|
||||
~PairLineLJ() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
|
||||
protected:
|
||||
double cut_global;
|
||||
|
||||
@ -27,16 +27,16 @@ namespace LAMMPS_NS {
|
||||
class PairRESquared : public Pair {
|
||||
public:
|
||||
PairRESquared(LAMMPS *lmp);
|
||||
virtual ~PairRESquared();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
virtual void init_style();
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
~PairRESquared() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
|
||||
protected:
|
||||
enum { SPHERE_SPHERE, SPHERE_ELLIPSE, ELLIPSE_SPHERE, ELLIPSE_ELLIPSE };
|
||||
|
||||
@ -27,12 +27,12 @@ namespace LAMMPS_NS {
|
||||
class PairTriLJ : public Pair {
|
||||
public:
|
||||
PairTriLJ(class LAMMPS *);
|
||||
virtual ~PairTriLJ();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
virtual void init_style();
|
||||
double init_one(int, int);
|
||||
~PairTriLJ() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
|
||||
protected:
|
||||
double cut_global;
|
||||
|
||||
@ -37,91 +37,91 @@ class FixATC : public Fix {
|
||||
public:
|
||||
/** constructor & destructor */
|
||||
FixATC(class LAMMPS *, int, char **);
|
||||
~FixATC();
|
||||
~FixATC() override;
|
||||
|
||||
/** initialization functions */
|
||||
void init();
|
||||
void init_list(int id, NeighList *ptr);
|
||||
void setup(int vflag);
|
||||
void min_setup(int vflag);
|
||||
void init() override;
|
||||
void init_list(int id, NeighList *ptr) override;
|
||||
void setup(int vflag) override;
|
||||
void min_setup(int vflag) override;
|
||||
|
||||
/** setmask: tell LAMMPS which fix methods to call */
|
||||
int setmask();
|
||||
int setmask() override;
|
||||
|
||||
/** initial_integrate */
|
||||
void initial_integrate(int vflag);
|
||||
void initial_integrate(int vflag) override;
|
||||
|
||||
/** after first integrate phase */
|
||||
void post_integrate();
|
||||
void post_integrate() override;
|
||||
|
||||
/** final_integrate */
|
||||
void final_integrate();
|
||||
void final_integrate() override;
|
||||
|
||||
/** end of step for run or minimize */
|
||||
void end_of_step();
|
||||
void end_of_step() override;
|
||||
|
||||
/** pre_exchange is used to modify fix-specific data
|
||||
and is called before domain->pbc() and comm->exchange(). */
|
||||
void setup_pre_exchange();
|
||||
void pre_exchange();
|
||||
void min_pre_exchange();
|
||||
void setup_pre_exchange() override;
|
||||
void pre_exchange() override;
|
||||
void min_pre_exchange() override;
|
||||
|
||||
double memory_usage();
|
||||
void grow_arrays(int);
|
||||
void copy_arrays(int, int, int);
|
||||
double memory_usage() override;
|
||||
void grow_arrays(int) override;
|
||||
void copy_arrays(int, int, int) override;
|
||||
|
||||
/** pack_exchange called from atom_vec->pack_exchange()
|
||||
and packs fix-specific data for a given real (local)
|
||||
atom being sent to another processor. */
|
||||
int pack_exchange(int, double *);
|
||||
int pack_exchange(int, double *) override;
|
||||
|
||||
/** unpack_exchange called from atom_vec->unpack_exchange()
|
||||
and unpacks fix-specific data for a given real (local)
|
||||
atom received from another processor. */
|
||||
int unpack_exchange(int, double *);
|
||||
int unpack_exchange(int, double *) override;
|
||||
|
||||
/** pack_comm called from comm->forward_comm_fix and
|
||||
packs fix-specific data for a given ghost atom
|
||||
from exchange with another proc */
|
||||
int pack_forward_comm(int, int *, double *, int, int *);
|
||||
int pack_forward_comm(int, int *, double *, int, int *) override;
|
||||
|
||||
/** unpack_comm called from comm->forward_comm_fix and
|
||||
unpacks fix-specific data for a given ghost atom
|
||||
from exchange with another proc */
|
||||
void unpack_forward_comm(int, int, double *);
|
||||
void unpack_forward_comm(int, int, double *) override;
|
||||
|
||||
/** pre_neighbor is used to modify fix-specific data
|
||||
and is called before neighbor list is built in
|
||||
neighbor->build(). */
|
||||
void pre_neighbor();
|
||||
void setup_pre_neighbor();
|
||||
void pre_neighbor() override;
|
||||
void setup_pre_neighbor() override;
|
||||
|
||||
/** pre/post_force is used to modify fix-specific data
|
||||
and is before/after the various force computations. */
|
||||
void pre_force(int vflag);
|
||||
void post_force(int vflag);
|
||||
void pre_force(int vflag) override;
|
||||
void post_force(int vflag) override;
|
||||
|
||||
/** post_run is called after a run completes */
|
||||
void post_run();
|
||||
void post_run() override;
|
||||
|
||||
/** min_pre_force is called before forces are calculated in minimize */
|
||||
void min_pre_force(int vflag);
|
||||
void min_pre_force(int vflag) override;
|
||||
|
||||
/** min_post_force is called after forces are calculated in minimize */
|
||||
void min_post_force(int vflag);
|
||||
void min_post_force(int vflag) override;
|
||||
|
||||
/** modify atc parameters (parser) */
|
||||
int modify_param(int narg, char **arg);
|
||||
int modify_param(int narg, char **arg) override;
|
||||
|
||||
/** calls ATC_Method to handle restarting/checkpointing */
|
||||
/** these four methods are for writing per-atom quantities */
|
||||
int pack_restart(int, double *);
|
||||
void unpack_restart(int, int);
|
||||
int size_restart(int);
|
||||
int maxsize_restart();
|
||||
int pack_restart(int, double *) override;
|
||||
void unpack_restart(int, int) override;
|
||||
int size_restart(int) override;
|
||||
int maxsize_restart() override;
|
||||
/** these two methods are for writing all other quantities */
|
||||
void write_restart(FILE *);
|
||||
void restart(char *);
|
||||
void write_restart(FILE *) override;
|
||||
void restart(char *) override;
|
||||
|
||||
/** accessor function for ATC_Method class pointer */
|
||||
const ATC::ATC_Method *atc() { return atc_; }
|
||||
@ -130,9 +130,9 @@ class FixATC : public Fix {
|
||||
LAMMPS *lammps_;
|
||||
|
||||
/** functions for "thermo" output */
|
||||
virtual double compute_scalar();
|
||||
virtual double compute_vector(int n);
|
||||
virtual double compute_array(int irow, int icol);
|
||||
double compute_scalar() override;
|
||||
double compute_vector(int n) override;
|
||||
double compute_array(int irow, int icol) override;
|
||||
double dtv, dtf;
|
||||
ATC::ATC_Method *atc_;
|
||||
};
|
||||
|
||||
@ -28,12 +28,12 @@ class AtomVecWavepacket : public AtomVec {
|
||||
public:
|
||||
AtomVecWavepacket(class LAMMPS *);
|
||||
|
||||
void grow_pointers();
|
||||
void force_clear(int, size_t);
|
||||
void create_atom_post(int);
|
||||
void data_atom_post(int);
|
||||
int property_atom(char *);
|
||||
void pack_property_atom(int, double *, int, int);
|
||||
void grow_pointers() override;
|
||||
void force_clear(int, size_t) override;
|
||||
void create_atom_post(int) override;
|
||||
void data_atom_post(int) override;
|
||||
int property_atom(char *) override;
|
||||
void pack_property_atom(int, double *, int, int) override;
|
||||
|
||||
private:
|
||||
int *spin;
|
||||
|
||||
@ -31,13 +31,13 @@ namespace LAMMPS_NS {
|
||||
class FixNVEAwpmd : public Fix {
|
||||
public:
|
||||
FixNVEAwpmd(class LAMMPS *, int, char **);
|
||||
int setmask();
|
||||
virtual void init();
|
||||
virtual void initial_integrate(int);
|
||||
virtual void final_integrate();
|
||||
void initial_integrate_respa(int, int, int);
|
||||
void final_integrate_respa(int, int);
|
||||
void reset_dt();
|
||||
int setmask() override;
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
void final_integrate() override;
|
||||
void initial_integrate_respa(int, int, int) override;
|
||||
void final_integrate_respa(int, int) override;
|
||||
void reset_dt() override;
|
||||
|
||||
protected:
|
||||
double dtv, dtf;
|
||||
|
||||
@ -34,22 +34,22 @@ class PairAWPMDCut : public Pair {
|
||||
|
||||
public:
|
||||
PairAWPMDCut(class LAMMPS *);
|
||||
virtual ~PairAWPMDCut();
|
||||
virtual void compute(int, int);
|
||||
virtual void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_style();
|
||||
~PairAWPMDCut() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
void min_pointers(double **, double **);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
virtual void write_restart_settings(FILE *);
|
||||
virtual void read_restart_settings(FILE *);
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
|
||||
void min_xf_pointers(int, double **, double **);
|
||||
void min_xf_get(int);
|
||||
void min_x_set(int);
|
||||
double memory_usage();
|
||||
void min_xf_pointers(int, double **, double **) override;
|
||||
void min_xf_get(int) override;
|
||||
void min_x_set(int) override;
|
||||
double memory_usage() override;
|
||||
|
||||
private:
|
||||
int flexible_pressure_flag;
|
||||
|
||||
@ -233,23 +233,14 @@ double ComputePressureBocs::get_cg_p_corr(double ** grid, int basis_type,
|
||||
double vCG)
|
||||
{
|
||||
int i = find_index(grid[0],vCG);
|
||||
double correction, deltax = vCG - grid[0][i];
|
||||
double deltax = vCG - grid[0][i];
|
||||
|
||||
if (basis_type == BASIS_LINEAR_SPLINE)
|
||||
{
|
||||
correction = grid[1][i] + (deltax) *
|
||||
( grid[1][i+1] - grid[1][i] ) / ( grid[0][i+1] - grid[0][i] );
|
||||
}
|
||||
return grid[1][i] + (deltax) * ( grid[1][i+1] - grid[1][i] ) / ( grid[0][i+1] - grid[0][i] );
|
||||
else if (basis_type == BASIS_CUBIC_SPLINE)
|
||||
{
|
||||
correction = grid[1][i] + (grid[2][i] * deltax) +
|
||||
(grid[3][i] * pow(deltax,2)) + (grid[4][i] * pow(deltax,3));
|
||||
}
|
||||
else
|
||||
{
|
||||
error->all(FLERR,"bad spline type passed to get_cg_p_corr()\n");
|
||||
}
|
||||
return correction;
|
||||
return grid[1][i] + (grid[2][i] * deltax) + (grid[3][i] * pow(deltax,2)) + (grid[4][i] * pow(deltax,3));
|
||||
else error->all(FLERR,"bad spline type passed to get_cg_p_corr()\n");
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
@ -261,11 +252,8 @@ void ComputePressureBocs::send_cg_info(int basis_type, int sent_N_basis,
|
||||
double *sent_phi_coeff, int sent_N_mol,
|
||||
double sent_vavg)
|
||||
{
|
||||
if (basis_type == BASIS_ANALYTIC) { p_basis_type = BASIS_ANALYTIC; }
|
||||
else
|
||||
{
|
||||
error->all(FLERR,"Incorrect basis type passed to ComputePressureBocs\n");
|
||||
}
|
||||
if (basis_type == BASIS_ANALYTIC) p_basis_type = BASIS_ANALYTIC;
|
||||
else error->all(FLERR,"Incorrect basis type passed to ComputePressureBocs\n");
|
||||
|
||||
p_match_flag = 1;
|
||||
|
||||
|
||||
@ -38,11 +38,11 @@ const int NUM_CUBIC_SPLINE_COLUMNS = 5; // cubic spline columns passed to co
|
||||
class ComputePressureBocs : public Compute {
|
||||
public:
|
||||
ComputePressureBocs(class LAMMPS *, int, char **);
|
||||
virtual ~ComputePressureBocs();
|
||||
virtual void init();
|
||||
virtual double compute_scalar();
|
||||
virtual void compute_vector();
|
||||
void reset_extra_compute_fix(const char *);
|
||||
~ComputePressureBocs() override;
|
||||
void init() override;
|
||||
double compute_scalar() override;
|
||||
void compute_vector() override;
|
||||
void reset_extra_compute_fix(const char *) override;
|
||||
|
||||
double compute_cg_scalar();
|
||||
double get_cg_p_corr(int, double *, int, double, double);
|
||||
|
||||
@ -30,26 +30,26 @@ namespace LAMMPS_NS {
|
||||
class FixBocs : public Fix {
|
||||
public:
|
||||
FixBocs(class LAMMPS *, int, char **); // MRD NJD
|
||||
virtual ~FixBocs(); // MRD NJD
|
||||
int setmask();
|
||||
virtual void init();
|
||||
virtual void setup(int);
|
||||
virtual void initial_integrate(int);
|
||||
virtual void final_integrate();
|
||||
void initial_integrate_respa(int, int, int);
|
||||
void pre_force_respa(int, int, int);
|
||||
void final_integrate_respa(int, int);
|
||||
virtual void pre_exchange();
|
||||
double compute_scalar();
|
||||
virtual double compute_vector(int);
|
||||
void write_restart(FILE *);
|
||||
~FixBocs() override; // MRD NJD
|
||||
int setmask() override;
|
||||
void init() override;
|
||||
void setup(int) override;
|
||||
void initial_integrate(int) override;
|
||||
void final_integrate() override;
|
||||
void initial_integrate_respa(int, int, int) override;
|
||||
void pre_force_respa(int, int, int) override;
|
||||
void final_integrate_respa(int, int) override;
|
||||
void pre_exchange() override;
|
||||
double compute_scalar() override;
|
||||
double compute_vector(int) override;
|
||||
void write_restart(FILE *) override;
|
||||
virtual int pack_restart_data(double *); // pack restart data
|
||||
virtual void restart(char *);
|
||||
int modify_param(int, char **);
|
||||
void reset_target(double);
|
||||
void reset_dt();
|
||||
virtual void *extract(const char *, int &);
|
||||
double memory_usage();
|
||||
void restart(char *) override;
|
||||
int modify_param(int, char **) override;
|
||||
void reset_target(double) override;
|
||||
void reset_dt() override;
|
||||
void *extract(const char *, int &) override;
|
||||
double memory_usage() override;
|
||||
|
||||
protected:
|
||||
int dimension, which;
|
||||
|
||||
@ -28,21 +28,21 @@ namespace LAMMPS_NS {
|
||||
class BodyNparticle : public Body {
|
||||
public:
|
||||
BodyNparticle(class LAMMPS *, int, char **);
|
||||
~BodyNparticle();
|
||||
~BodyNparticle() override;
|
||||
int nsub(struct AtomVecBody::Bonus *);
|
||||
double *coords(struct AtomVecBody::Bonus *);
|
||||
|
||||
int pack_border_body(struct AtomVecBody::Bonus *, double *);
|
||||
int unpack_border_body(struct AtomVecBody::Bonus *, double *);
|
||||
void data_body(int, int, int, int *, double *);
|
||||
int pack_data_body(tagint, int, double *);
|
||||
int write_data_body(FILE *, double *);
|
||||
double radius_body(int, int, int *, double *);
|
||||
int pack_border_body(struct AtomVecBody::Bonus *, double *) override;
|
||||
int unpack_border_body(struct AtomVecBody::Bonus *, double *) override;
|
||||
void data_body(int, int, int, int *, double *) override;
|
||||
int pack_data_body(tagint, int, double *) override;
|
||||
int write_data_body(FILE *, double *) override;
|
||||
double radius_body(int, int, int *, double *) override;
|
||||
|
||||
int noutrow(int);
|
||||
int noutcol();
|
||||
void output(int, int, double *);
|
||||
int image(int, double, double, int *&, double **&);
|
||||
int noutrow(int) override;
|
||||
int noutcol() override;
|
||||
void output(int, int, double *) override;
|
||||
int image(int, double, double, int *&, double **&) override;
|
||||
|
||||
private:
|
||||
int *imflag;
|
||||
|
||||
@ -28,7 +28,7 @@ namespace LAMMPS_NS {
|
||||
class BodyRoundedPolygon : public Body {
|
||||
public:
|
||||
BodyRoundedPolygon(class LAMMPS *, int, char **);
|
||||
~BodyRoundedPolygon();
|
||||
~BodyRoundedPolygon() override;
|
||||
int nsub(struct AtomVecBody::Bonus *);
|
||||
double *coords(struct AtomVecBody::Bonus *);
|
||||
int nedges(struct AtomVecBody::Bonus *);
|
||||
@ -36,17 +36,17 @@ class BodyRoundedPolygon : public Body {
|
||||
double enclosing_radius(struct AtomVecBody::Bonus *);
|
||||
double rounded_radius(struct AtomVecBody::Bonus *);
|
||||
|
||||
int pack_border_body(struct AtomVecBody::Bonus *, double *);
|
||||
int unpack_border_body(struct AtomVecBody::Bonus *, double *);
|
||||
void data_body(int, int, int, int *, double *);
|
||||
int pack_data_body(tagint, int, double *);
|
||||
int write_data_body(FILE *, double *);
|
||||
double radius_body(int, int, int *, double *);
|
||||
int pack_border_body(struct AtomVecBody::Bonus *, double *) override;
|
||||
int unpack_border_body(struct AtomVecBody::Bonus *, double *) override;
|
||||
void data_body(int, int, int, int *, double *) override;
|
||||
int pack_data_body(tagint, int, double *) override;
|
||||
int write_data_body(FILE *, double *) override;
|
||||
double radius_body(int, int, int *, double *) override;
|
||||
|
||||
int noutrow(int);
|
||||
int noutcol();
|
||||
void output(int, int, double *);
|
||||
int image(int, double, double, int *&, double **&);
|
||||
int noutrow(int) override;
|
||||
int noutcol() override;
|
||||
void output(int, int, double *) override;
|
||||
int image(int, double, double, int *&, double **&) override;
|
||||
|
||||
private:
|
||||
int *imflag;
|
||||
|
||||
@ -28,7 +28,7 @@ namespace LAMMPS_NS {
|
||||
class BodyRoundedPolyhedron : public Body {
|
||||
public:
|
||||
BodyRoundedPolyhedron(class LAMMPS *, int, char **);
|
||||
~BodyRoundedPolyhedron();
|
||||
~BodyRoundedPolyhedron() override;
|
||||
int nsub(struct AtomVecBody::Bonus *);
|
||||
double *coords(struct AtomVecBody::Bonus *);
|
||||
int nedges(struct AtomVecBody::Bonus *);
|
||||
@ -38,17 +38,17 @@ class BodyRoundedPolyhedron : public Body {
|
||||
double enclosing_radius(struct AtomVecBody::Bonus *);
|
||||
double rounded_radius(struct AtomVecBody::Bonus *);
|
||||
|
||||
int pack_border_body(struct AtomVecBody::Bonus *, double *);
|
||||
int unpack_border_body(struct AtomVecBody::Bonus *, double *);
|
||||
void data_body(int, int, int, int *, double *);
|
||||
int pack_data_body(tagint, int, double *);
|
||||
int write_data_body(FILE *, double *);
|
||||
double radius_body(int, int, int *, double *);
|
||||
int pack_border_body(struct AtomVecBody::Bonus *, double *) override;
|
||||
int unpack_border_body(struct AtomVecBody::Bonus *, double *) override;
|
||||
void data_body(int, int, int, int *, double *) override;
|
||||
int pack_data_body(tagint, int, double *) override;
|
||||
int write_data_body(FILE *, double *) override;
|
||||
double radius_body(int, int, int *, double *) override;
|
||||
|
||||
int noutrow(int);
|
||||
int noutcol();
|
||||
void output(int, int, double *);
|
||||
int image(int, double, double, int *&, double **&);
|
||||
int noutrow(int) override;
|
||||
int noutcol() override;
|
||||
void output(int, int, double *) override;
|
||||
int image(int, double, double, int *&, double **&) override;
|
||||
|
||||
private:
|
||||
int *imflag;
|
||||
|
||||
@ -27,10 +27,10 @@ namespace LAMMPS_NS {
|
||||
class ComputeBodyLocal : public Compute {
|
||||
public:
|
||||
ComputeBodyLocal(class LAMMPS *, int, char **);
|
||||
~ComputeBodyLocal();
|
||||
void init();
|
||||
void compute_local();
|
||||
double memory_usage();
|
||||
~ComputeBodyLocal() override;
|
||||
void init() override;
|
||||
void compute_local() override;
|
||||
double memory_usage() override;
|
||||
|
||||
private:
|
||||
int nvalues;
|
||||
|
||||
@ -27,14 +27,14 @@ namespace LAMMPS_NS {
|
||||
class ComputeTempBody : public Compute {
|
||||
public:
|
||||
ComputeTempBody(class LAMMPS *, int, char **);
|
||||
~ComputeTempBody();
|
||||
void init();
|
||||
void setup();
|
||||
double compute_scalar();
|
||||
void compute_vector();
|
||||
~ComputeTempBody() override;
|
||||
void init() override;
|
||||
void setup() override;
|
||||
double compute_scalar() override;
|
||||
void compute_vector() override;
|
||||
|
||||
void remove_bias(int, double *);
|
||||
void restore_bias(int, double *);
|
||||
void remove_bias(int, double *) override;
|
||||
void restore_bias(int, double *) override;
|
||||
|
||||
private:
|
||||
int mode;
|
||||
|
||||
@ -21,16 +21,15 @@ namespace LAMMPS_NS {
|
||||
class FixNHBody : public FixNH {
|
||||
public:
|
||||
FixNHBody(class LAMMPS *, int, char **);
|
||||
virtual ~FixNHBody() {}
|
||||
void init();
|
||||
void init() override;
|
||||
|
||||
protected:
|
||||
double dtq;
|
||||
class AtomVecBody *avec;
|
||||
|
||||
void nve_v();
|
||||
void nve_x();
|
||||
void nh_v_temp();
|
||||
void nve_v() override;
|
||||
void nve_x() override;
|
||||
void nh_v_temp() override;
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -27,7 +27,6 @@ namespace LAMMPS_NS {
|
||||
class FixNPHBody : public FixNHBody {
|
||||
public:
|
||||
FixNPHBody(class LAMMPS *, int, char **);
|
||||
~FixNPHBody() {}
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -27,7 +27,6 @@ namespace LAMMPS_NS {
|
||||
class FixNPTBody : public FixNHBody {
|
||||
public:
|
||||
FixNPTBody(class LAMMPS *, int, char **);
|
||||
~FixNPTBody() {}
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -27,9 +27,9 @@ namespace LAMMPS_NS {
|
||||
class FixNVEBody : public FixNVE {
|
||||
public:
|
||||
FixNVEBody(class LAMMPS *, int, char **);
|
||||
void init();
|
||||
void initial_integrate(int);
|
||||
void final_integrate();
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
void final_integrate() override;
|
||||
|
||||
private:
|
||||
double dtq;
|
||||
|
||||
@ -27,7 +27,6 @@ namespace LAMMPS_NS {
|
||||
class FixNVTBody : public FixNHBody {
|
||||
public:
|
||||
FixNVTBody(class LAMMPS *, int, char **);
|
||||
~FixNVTBody() {}
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -27,12 +27,12 @@ namespace LAMMPS_NS {
|
||||
class FixWallBodyPolygon : public Fix {
|
||||
public:
|
||||
FixWallBodyPolygon(class LAMMPS *, int, char **);
|
||||
virtual ~FixWallBodyPolygon();
|
||||
int setmask();
|
||||
void init();
|
||||
void setup(int);
|
||||
virtual void post_force(int);
|
||||
void reset_dt();
|
||||
~FixWallBodyPolygon() override;
|
||||
int setmask() override;
|
||||
void init() override;
|
||||
void setup(int) override;
|
||||
void post_force(int) override;
|
||||
void reset_dt() override;
|
||||
|
||||
struct Contact {
|
||||
int ibody, jbody; // body (i.e. atom) indices (not tags)
|
||||
|
||||
@ -27,12 +27,12 @@ namespace LAMMPS_NS {
|
||||
class FixWallBodyPolyhedron : public Fix {
|
||||
public:
|
||||
FixWallBodyPolyhedron(class LAMMPS *, int, char **);
|
||||
virtual ~FixWallBodyPolyhedron();
|
||||
int setmask();
|
||||
void init();
|
||||
void setup(int);
|
||||
virtual void post_force(int);
|
||||
void reset_dt();
|
||||
~FixWallBodyPolyhedron() override;
|
||||
int setmask() override;
|
||||
void init() override;
|
||||
void setup(int) override;
|
||||
void post_force(int) override;
|
||||
void reset_dt() override;
|
||||
|
||||
struct Contact {
|
||||
int ibody, jbody; // body (i.e. atom) indices (not tags)
|
||||
|
||||
@ -27,12 +27,12 @@ namespace LAMMPS_NS {
|
||||
class PairBodyNparticle : public Pair {
|
||||
public:
|
||||
PairBodyNparticle(class LAMMPS *);
|
||||
~PairBodyNparticle();
|
||||
void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_style();
|
||||
double init_one(int, int);
|
||||
~PairBodyNparticle() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
|
||||
protected:
|
||||
double cut_global;
|
||||
|
||||
@ -27,12 +27,12 @@ namespace LAMMPS_NS {
|
||||
class PairBodyRoundedPolygon : public Pair {
|
||||
public:
|
||||
PairBodyRoundedPolygon(class LAMMPS *);
|
||||
~PairBodyRoundedPolygon();
|
||||
void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_style();
|
||||
double init_one(int, int);
|
||||
~PairBodyRoundedPolygon() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
|
||||
struct Contact {
|
||||
int ibody, jbody; // body (i.e. atom) indices (not tags)
|
||||
|
||||
@ -27,12 +27,12 @@ namespace LAMMPS_NS {
|
||||
class PairBodyRoundedPolyhedron : public Pair {
|
||||
public:
|
||||
PairBodyRoundedPolyhedron(class LAMMPS *);
|
||||
~PairBodyRoundedPolyhedron();
|
||||
void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_style();
|
||||
double init_one(int, int);
|
||||
~PairBodyRoundedPolyhedron() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
|
||||
virtual void kernel_force(double R, int itype, int jtype, double &energy, double &fpair);
|
||||
|
||||
|
||||
@ -27,17 +27,17 @@ namespace LAMMPS_NS {
|
||||
class AtomVecSphereBPM : public AtomVec {
|
||||
public:
|
||||
AtomVecSphereBPM(class LAMMPS *);
|
||||
void process_args(int, char **);
|
||||
void init();
|
||||
void process_args(int, char **) override;
|
||||
void init() override;
|
||||
|
||||
void grow_pointers();
|
||||
void create_atom_post(int);
|
||||
void pack_restart_pre(int);
|
||||
void pack_restart_post(int);
|
||||
void unpack_restart_init(int);
|
||||
void data_atom_post(int);
|
||||
void pack_data_pre(int);
|
||||
void pack_data_post(int);
|
||||
void grow_pointers() override;
|
||||
void create_atom_post(int) override;
|
||||
void pack_restart_pre(int) override;
|
||||
void pack_restart_post(int) override;
|
||||
void unpack_restart_init(int) override;
|
||||
void data_atom_post(int) override;
|
||||
void pack_data_pre(int) override;
|
||||
void pack_data_post(int) override;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@ -23,16 +23,16 @@ namespace LAMMPS_NS {
|
||||
class BondBPM : public Bond {
|
||||
public:
|
||||
BondBPM(class LAMMPS *);
|
||||
virtual ~BondBPM();
|
||||
virtual void compute(int, int) = 0;
|
||||
virtual void coeff(int, char **) = 0;
|
||||
virtual void init_style();
|
||||
void settings(int, char **);
|
||||
double equilibrium_distance(int);
|
||||
void write_restart(FILE *){};
|
||||
void read_restart(FILE *){};
|
||||
void write_data(FILE *) {};
|
||||
double single(int, double, int, int, double &) = 0;
|
||||
virtual ~BondBPM() override;
|
||||
virtual void compute(int, int) override = 0;
|
||||
virtual void coeff(int, char **) override = 0;
|
||||
virtual void init_style() override;
|
||||
void settings(int, char **) override;
|
||||
double equilibrium_distance(int) override;
|
||||
void write_restart(FILE *) override {};
|
||||
void read_restart(FILE *) override {};
|
||||
void write_data(FILE *) override {};
|
||||
double single(int, double, int, int, double &) override = 0;
|
||||
|
||||
protected:
|
||||
double r0_max_estimate;
|
||||
|
||||
@ -27,15 +27,15 @@ namespace LAMMPS_NS {
|
||||
class BondBPMRotational : public BondBPM {
|
||||
public:
|
||||
BondBPMRotational(class LAMMPS *);
|
||||
virtual ~BondBPMRotational();
|
||||
virtual void compute(int, int);
|
||||
void coeff(int, char **);
|
||||
void init_style();
|
||||
void settings(int, char **);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
virtual ~BondBPMRotational() override;
|
||||
virtual void compute(int, int) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
void settings(int, char **) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
double single(int, double, int, int, double &) override;
|
||||
|
||||
protected:
|
||||
double *Kr, *Ks, *Kt, *Kb, *gnorm, *gslide, *groll, *gtwist;
|
||||
|
||||
@ -27,15 +27,15 @@ namespace LAMMPS_NS {
|
||||
class BondBPMSpring : public BondBPM {
|
||||
public:
|
||||
BondBPMSpring(class LAMMPS *);
|
||||
virtual ~BondBPMSpring();
|
||||
virtual void compute(int, int);
|
||||
void coeff(int, char **);
|
||||
void init_style();
|
||||
void settings(int, char **);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
virtual ~BondBPMSpring() override;
|
||||
virtual void compute(int, int) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
void settings(int, char **) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
double single(int, double, int, int, double &) override;
|
||||
|
||||
protected:
|
||||
double *k, *ecrit, *gamma;
|
||||
|
||||
@ -27,12 +27,12 @@ namespace LAMMPS_NS {
|
||||
class ComputeNBondAtom : public Compute {
|
||||
public:
|
||||
ComputeNBondAtom(class LAMMPS *, int, char **);
|
||||
~ComputeNBondAtom();
|
||||
void init() {}
|
||||
void compute_peratom();
|
||||
int pack_reverse_comm(int, int, double *);
|
||||
void unpack_reverse_comm(int, int *, double *);
|
||||
double memory_usage();
|
||||
~ComputeNBondAtom() override;
|
||||
void init() override {}
|
||||
void compute_peratom() override;
|
||||
int pack_reverse_comm(int, int, double *) override;
|
||||
void unpack_reverse_comm(int, int *, double *) override;
|
||||
double memory_usage() override;
|
||||
|
||||
private:
|
||||
int nmax;
|
||||
|
||||
@ -27,10 +27,10 @@ namespace LAMMPS_NS {
|
||||
class FixNVESphereBPM : public FixNVE {
|
||||
public:
|
||||
FixNVESphereBPM(class LAMMPS *, int, char **);
|
||||
virtual ~FixNVESphereBPM() {}
|
||||
void init();
|
||||
virtual void initial_integrate(int);
|
||||
virtual void final_integrate();
|
||||
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
void final_integrate() override;
|
||||
|
||||
protected:
|
||||
double inertia, inv_inertia;
|
||||
|
||||
@ -27,16 +27,16 @@ namespace LAMMPS_NS {
|
||||
class PairBPMSpring : public Pair {
|
||||
public:
|
||||
PairBPMSpring(class LAMMPS *);
|
||||
virtual ~PairBPMSpring();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
virtual ~PairBPMSpring() override;
|
||||
virtual void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
double single(int, int, int, int, double, double, double, double &) override;
|
||||
|
||||
protected:
|
||||
double **k,**cut,**gamma;
|
||||
|
||||
@ -27,9 +27,9 @@ namespace LAMMPS_NS {
|
||||
class FixBrownian : public FixBrownianBase {
|
||||
public:
|
||||
FixBrownian(class LAMMPS *, int, char **);
|
||||
virtual ~FixBrownian(){};
|
||||
void init();
|
||||
void initial_integrate(int);
|
||||
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
|
||||
private:
|
||||
template <int Tp_UNIFORM, int Tp_GAUSS, int Tp_2D> void initial_integrate_templated();
|
||||
|
||||
@ -27,9 +27,9 @@ namespace LAMMPS_NS {
|
||||
class FixBrownianAsphere : public FixBrownianBase {
|
||||
public:
|
||||
FixBrownianAsphere(class LAMMPS *, int, char **);
|
||||
virtual ~FixBrownianAsphere(){};
|
||||
void initial_integrate(int);
|
||||
void init();
|
||||
|
||||
void initial_integrate(int) override;
|
||||
void init() override;
|
||||
|
||||
protected:
|
||||
class AtomVecEllipsoid *avec;
|
||||
|
||||
@ -21,10 +21,10 @@ namespace LAMMPS_NS {
|
||||
class FixBrownianBase : public Fix {
|
||||
public:
|
||||
FixBrownianBase(class LAMMPS *, int, char **);
|
||||
virtual ~FixBrownianBase();
|
||||
void init();
|
||||
int setmask();
|
||||
void reset_dt();
|
||||
~FixBrownianBase() override;
|
||||
void init() override;
|
||||
int setmask() override;
|
||||
void reset_dt() override;
|
||||
|
||||
protected:
|
||||
int seed; // RNG seed
|
||||
|
||||
@ -27,9 +27,9 @@ namespace LAMMPS_NS {
|
||||
class FixBrownianSphere : public FixBrownianBase {
|
||||
public:
|
||||
FixBrownianSphere(class LAMMPS *, int, char **);
|
||||
virtual ~FixBrownianSphere(){};
|
||||
void init();
|
||||
void initial_integrate(int);
|
||||
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
|
||||
private:
|
||||
template <int Tp_UNIFORM, int Tp_GAUSS, int Tp_2D> void initial_integrate_templated();
|
||||
|
||||
@ -26,11 +26,11 @@ namespace LAMMPS_NS {
|
||||
class FixPropelSelf : public Fix {
|
||||
public:
|
||||
FixPropelSelf(class LAMMPS *, int, char **);
|
||||
virtual ~FixPropelSelf(){};
|
||||
void init();
|
||||
void post_force(int);
|
||||
void setup(int);
|
||||
int setmask();
|
||||
|
||||
void init() override;
|
||||
void post_force(int) override;
|
||||
void setup(int) override;
|
||||
int setmask() override;
|
||||
|
||||
private:
|
||||
double magnitude;
|
||||
|
||||
@ -27,11 +27,10 @@ namespace LAMMPS_NS {
|
||||
class AtomVecOxdna : public AtomVec {
|
||||
public:
|
||||
AtomVecOxdna(class LAMMPS *);
|
||||
~AtomVecOxdna() = default;
|
||||
|
||||
void grow_pointers();
|
||||
void data_atom_post(int);
|
||||
void data_bonds_post(int, int, tagint, tagint, tagint);
|
||||
void grow_pointers() override;
|
||||
void data_atom_post(int) override;
|
||||
void data_bonds_post(int, int, tagint, tagint, tagint) override;
|
||||
|
||||
private:
|
||||
tagint *id5p;
|
||||
|
||||
@ -27,8 +27,7 @@ namespace LAMMPS_NS {
|
||||
class BondOxdna2Fene : public BondOxdnaFene {
|
||||
public:
|
||||
BondOxdna2Fene(class LAMMPS *lmp) : BondOxdnaFene(lmp) {}
|
||||
virtual ~BondOxdna2Fene() {}
|
||||
virtual void compute_interaction_sites(double *, double *, double *, double *) const;
|
||||
void compute_interaction_sites(double *, double *, double *, double *) const override;
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -24,8 +24,8 @@
|
||||
#include "neighbor.h"
|
||||
#include "update.h"
|
||||
|
||||
#include "atom_vec_ellipsoid.h"
|
||||
#include "math_extra.h"
|
||||
#include "pair.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
@ -145,25 +145,21 @@ void BondOxdnaFene::ev_tally_xyz(int i, int j, int nlocal, int newton_bond, doub
|
||||
------------------------------------------------------------------------- */
|
||||
void BondOxdnaFene::compute(int eflag, int vflag)
|
||||
{
|
||||
int a, b, in, type;
|
||||
double delf[3], delta[3], deltb[3]; // force, torque increment;;
|
||||
double delr[3], ebond, fbond;
|
||||
double rsq, Deltasq, rlogarg;
|
||||
double r, rr0, rr0sq;
|
||||
int a,b,in,type;
|
||||
double delf[3],delta[3],deltb[3]; // force, torque increment;;
|
||||
double delr[3],ebond,fbond;
|
||||
double rsq,Deltasq,rlogarg;
|
||||
double r,rr0,rr0sq;
|
||||
// vectors COM-backbone site in lab frame
|
||||
double ra_cs[3], rb_cs[3];
|
||||
|
||||
double *qa, ax[3], ay[3], az[3];
|
||||
double *qb, bx[3], by[3], bz[3];
|
||||
double ra_cs[3],rb_cs[3];
|
||||
// Cartesian unit vectors in lab frame
|
||||
double ax[3],ay[3],az[3];
|
||||
double bx[3],by[3],bz[3];
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
double **torque = atom->torque;
|
||||
|
||||
AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
|
||||
AtomVecEllipsoid::Bonus *bonus = avec->bonus;
|
||||
int *ellipsoid = atom->ellipsoid;
|
||||
|
||||
int **bondlist = neighbor->bondlist;
|
||||
int nbondlist = neighbor->nbondlist;
|
||||
int nlocal = atom->nlocal;
|
||||
@ -172,6 +168,12 @@ void BondOxdnaFene::compute(int eflag, int vflag)
|
||||
ebond = 0.0;
|
||||
ev_init(eflag, vflag);
|
||||
|
||||
// n(x/y/z)_xtrct = extracted local unit vectors in lab frame from oxdna_excv
|
||||
int dim;
|
||||
nx_xtrct = (double **) force->pair->extract("nx",dim);
|
||||
ny_xtrct = (double **) force->pair->extract("ny",dim);
|
||||
nz_xtrct = (double **) force->pair->extract("nz",dim);
|
||||
|
||||
// loop over FENE bonds
|
||||
|
||||
for (in = 0; in < nbondlist; in++) {
|
||||
@ -180,10 +182,24 @@ void BondOxdnaFene::compute(int eflag, int vflag)
|
||||
b = bondlist[in][0];
|
||||
type = bondlist[in][2];
|
||||
|
||||
qa = bonus[ellipsoid[a]].quat;
|
||||
MathExtra::q_to_exyz(qa, ax, ay, az);
|
||||
qb = bonus[ellipsoid[b]].quat;
|
||||
MathExtra::q_to_exyz(qb, bx, by, bz);
|
||||
ax[0] = nx_xtrct[a][0];
|
||||
ax[1] = nx_xtrct[a][1];
|
||||
ax[2] = nx_xtrct[a][2];
|
||||
ay[0] = ny_xtrct[a][0];
|
||||
ay[1] = ny_xtrct[a][1];
|
||||
ay[2] = ny_xtrct[a][2];
|
||||
az[0] = nz_xtrct[a][0];
|
||||
az[1] = nz_xtrct[a][1];
|
||||
az[2] = nz_xtrct[a][2];
|
||||
bx[0] = nx_xtrct[b][0];
|
||||
bx[1] = nx_xtrct[b][1];
|
||||
bx[2] = nx_xtrct[b][2];
|
||||
by[0] = ny_xtrct[b][0];
|
||||
by[1] = ny_xtrct[b][1];
|
||||
by[2] = ny_xtrct[b][2];
|
||||
bz[0] = nz_xtrct[b][0];
|
||||
bz[1] = nz_xtrct[b][1];
|
||||
bz[2] = nz_xtrct[b][2];
|
||||
|
||||
// vector COM-backbone site a and b
|
||||
compute_interaction_sites(ax, ay, az, ra_cs);
|
||||
|
||||
@ -27,19 +27,20 @@ namespace LAMMPS_NS {
|
||||
class BondOxdnaFene : public Bond {
|
||||
public:
|
||||
BondOxdnaFene(class LAMMPS *lmp) : Bond(lmp) {}
|
||||
virtual ~BondOxdnaFene();
|
||||
~BondOxdnaFene() override;
|
||||
virtual void compute_interaction_sites(double *, double *, double *, double *) const;
|
||||
virtual void compute(int, int);
|
||||
void coeff(int, char **);
|
||||
void init_style();
|
||||
double equilibrium_distance(int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
void compute(int, int) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double equilibrium_distance(int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
double single(int, double, int, int, double &) override;
|
||||
|
||||
protected:
|
||||
double *k, *Delta, *r0; // FENE
|
||||
double **nx_xtrct, **ny_xtrct, **nz_xtrct; // per-atom arrays for local unit vectors
|
||||
|
||||
void allocate();
|
||||
void ev_tally_xyz(int, int, int, int, double, double, double, double, double, double, double);
|
||||
|
||||
@ -27,9 +27,8 @@ namespace LAMMPS_NS {
|
||||
class BondOxrna2Fene : public BondOxdnaFene {
|
||||
public:
|
||||
BondOxrna2Fene(class LAMMPS *lmp) : BondOxdnaFene(lmp) {}
|
||||
virtual ~BondOxrna2Fene() {}
|
||||
|
||||
virtual void compute_interaction_sites(double *, double *, double *, double *) const;
|
||||
void compute_interaction_sites(double *, double *, double *, double *) const override;
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -27,9 +27,9 @@ namespace LAMMPS_NS {
|
||||
class FixNVEDot : public FixNVE {
|
||||
public:
|
||||
FixNVEDot(class LAMMPS *, int, char **);
|
||||
void init();
|
||||
void initial_integrate(int);
|
||||
void final_integrate();
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
void final_integrate() override;
|
||||
|
||||
private:
|
||||
double dt, dthlf, dthlfm;
|
||||
|
||||
@ -27,10 +27,10 @@ namespace LAMMPS_NS {
|
||||
class FixNVEDotcLangevin : public FixNVE {
|
||||
public:
|
||||
FixNVEDotcLangevin(class LAMMPS *, int, char **);
|
||||
virtual ~FixNVEDotcLangevin();
|
||||
void init();
|
||||
void initial_integrate(int);
|
||||
void final_integrate();
|
||||
~FixNVEDotcLangevin() override;
|
||||
void init() override;
|
||||
void initial_integrate(int) override;
|
||||
void final_integrate() override;
|
||||
|
||||
private:
|
||||
double dt, dthlf, dthlfm, dtqrt;
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
#include "pair_oxdna2_coaxstk.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "atom_vec_ellipsoid.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
@ -102,7 +101,7 @@ void PairOxdna2Coaxstk::compute(int eflag, int vflag)
|
||||
{
|
||||
|
||||
double delf[3],delta[3],deltb[3]; // force, torque increment;
|
||||
double evdwl,fpair,finc,tpair,factor_lj;
|
||||
double evdwl,finc,tpair,factor_lj;
|
||||
double v1tmp[3];
|
||||
double delr_ss[3],delr_ss_norm[3],rsq_ss,r_ss,rinv_ss;
|
||||
double delr_st[3],delr_st_norm[3],rsq_st,r_st,rinv_st;
|
||||
@ -118,9 +117,9 @@ void PairOxdna2Coaxstk::compute(int eflag, int vflag)
|
||||
double ra_cs[3],ra_cst[3];
|
||||
double rb_cs[3],rb_cst[3];
|
||||
|
||||
// quaternions and Cartesian unit vectors in lab frame
|
||||
double *qa,ax[3],ay[3],az[3];
|
||||
double *qb,bx[3],by[3],bz[3];
|
||||
// Cartesian unit vectors in lab frame
|
||||
double ax[3],az[3];
|
||||
double bx[3],bz[3];
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
@ -132,10 +131,6 @@ void PairOxdna2Coaxstk::compute(int eflag, int vflag)
|
||||
int *alist,*blist,*numneigh,**firstneigh;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
|
||||
AtomVecEllipsoid::Bonus *bonus = avec->bonus;
|
||||
int *ellipsoid = atom->ellipsoid;
|
||||
|
||||
int a,b,ia,ib,anum,bnum,atype,btype;
|
||||
|
||||
double f2,f4f6t1,f4t4,f4t5,f4t6;
|
||||
@ -149,6 +144,11 @@ void PairOxdna2Coaxstk::compute(int eflag, int vflag)
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
// n(x/z)_xtrct = extracted local unit vectors from oxdna_excv
|
||||
int dim;
|
||||
nx_xtrct = (double **) force->pair->extract("nx",dim);
|
||||
nz_xtrct = (double **) force->pair->extract("nz",dim);
|
||||
|
||||
// loop over pair interaction neighbors of my atoms
|
||||
|
||||
for (ia = 0; ia < anum; ia++) {
|
||||
@ -156,8 +156,9 @@ void PairOxdna2Coaxstk::compute(int eflag, int vflag)
|
||||
a = alist[ia];
|
||||
atype = type[a];
|
||||
|
||||
qa=bonus[ellipsoid[a]].quat;
|
||||
MathExtra::q_to_exyz(qa,ax,ay,az);
|
||||
ax[0] = nx_xtrct[a][0];
|
||||
ax[1] = nx_xtrct[a][1];
|
||||
ax[2] = nx_xtrct[a][2];
|
||||
|
||||
// vector COM a - stacking site a
|
||||
ra_cst[0] = d_cst*ax[0];
|
||||
@ -180,8 +181,9 @@ void PairOxdna2Coaxstk::compute(int eflag, int vflag)
|
||||
|
||||
btype = type[b];
|
||||
|
||||
qb=bonus[ellipsoid[b]].quat;
|
||||
MathExtra::q_to_exyz(qb,bx,by,bz);
|
||||
bx[0] = nx_xtrct[b][0];
|
||||
bx[1] = nx_xtrct[b][1];
|
||||
bx[2] = nx_xtrct[b][2];
|
||||
|
||||
// vector COM b - stacking site b
|
||||
rb_cst[0] = d_cst*bx[0];
|
||||
@ -232,6 +234,13 @@ void PairOxdna2Coaxstk::compute(int eflag, int vflag)
|
||||
// early rejection criterium
|
||||
if (f4f6t1) {
|
||||
|
||||
az[0] = nz_xtrct[a][0];
|
||||
az[1] = nz_xtrct[a][1];
|
||||
az[2] = nz_xtrct[a][2];
|
||||
bz[0] = nz_xtrct[b][0];
|
||||
bz[1] = nz_xtrct[b][1];
|
||||
bz[2] = nz_xtrct[b][2];
|
||||
|
||||
cost4 = MathExtra::dot3(az,bz);
|
||||
if (cost4 > 1.0) cost4 = 1.0;
|
||||
if (cost4 < -1.0) cost4 = -1.0;
|
||||
@ -306,9 +315,7 @@ void PairOxdna2Coaxstk::compute(int eflag, int vflag)
|
||||
DF4(theta6p, a_cxst6[atype][btype], theta_cxst6_0[atype][btype], dtheta_cxst6_ast[atype][btype],
|
||||
b_cxst6[atype][btype], dtheta_cxst6_c[atype][btype])*rsint;
|
||||
|
||||
// force, torque and virial contribution for forces between stacking sites
|
||||
|
||||
fpair = 0.0;
|
||||
// force, torque and virial contribution for forces between stacking sites
|
||||
|
||||
delf[0] = 0.0;
|
||||
delf[1] = 0.0;
|
||||
@ -324,7 +331,6 @@ void PairOxdna2Coaxstk::compute(int eflag, int vflag)
|
||||
|
||||
// radial force
|
||||
finc = -df2 * f4f6t1 * f4t4 * f4t5 * f4t6 * rinv_st * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += delr_st[0] * finc;
|
||||
delf[1] += delr_st[1] * finc;
|
||||
@ -334,7 +340,6 @@ void PairOxdna2Coaxstk::compute(int eflag, int vflag)
|
||||
if (theta5 && theta5p) {
|
||||
|
||||
finc = -f2 * f4f6t1 * f4t4 * df4t5 * f4t6 * rinv_st * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_st_norm[0]*cost5 - az[0]) * finc;
|
||||
delf[1] += (delr_st_norm[1]*cost5 - az[1]) * finc;
|
||||
@ -346,7 +351,6 @@ void PairOxdna2Coaxstk::compute(int eflag, int vflag)
|
||||
if (theta6 && theta6p) {
|
||||
|
||||
finc = -f2 * f4f6t1* f4t4 * f4t5 * df4t6 * rinv_st * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_st_norm[0]*cost6 - bz[0]) * finc;
|
||||
delf[1] += (delr_st_norm[1]*cost6 - bz[1]) * finc;
|
||||
|
||||
@ -27,39 +27,35 @@ namespace LAMMPS_NS {
|
||||
class PairOxdna2Coaxstk : public Pair {
|
||||
public:
|
||||
PairOxdna2Coaxstk(class LAMMPS *);
|
||||
virtual ~PairOxdna2Coaxstk();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_list(int, class NeighList *);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
void *extract(const char *, int &);
|
||||
~PairOxdna2Coaxstk() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_list(int, class NeighList *) override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
protected:
|
||||
// coaxial stacking interaction
|
||||
double **k_cxst, **cut_cxst_0, **cut_cxst_c, **cut_cxst_lo, **cut_cxst_hi;
|
||||
double **cut_cxst_lc, **cut_cxst_hc, **b_cxst_lo, **b_cxst_hi;
|
||||
double **cutsq_cxst_hc;
|
||||
|
||||
double **a_cxst1, **theta_cxst1_0, **dtheta_cxst1_ast;
|
||||
double **b_cxst1, **dtheta_cxst1_c;
|
||||
|
||||
double **a_cxst4, **theta_cxst4_0, **dtheta_cxst4_ast;
|
||||
double **b_cxst4, **dtheta_cxst4_c;
|
||||
|
||||
double **a_cxst5, **theta_cxst5_0, **dtheta_cxst5_ast;
|
||||
double **b_cxst5, **dtheta_cxst5_c;
|
||||
|
||||
double **a_cxst6, **theta_cxst6_0, **dtheta_cxst6_ast;
|
||||
double **b_cxst6, **dtheta_cxst6_c;
|
||||
|
||||
double **AA_cxst1, **BB_cxst1;
|
||||
double **nx_xtrct, **nz_xtrct; // per-atom arrays for local unit vectors
|
||||
|
||||
virtual void allocate();
|
||||
};
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
#include "pair_oxdna2_dh.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "atom_vec_ellipsoid.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
@ -87,10 +86,9 @@ void PairOxdna2Dh::compute(int eflag, int vflag)
|
||||
// vectors COM-backbone sites in lab frame
|
||||
double ra_cs[3],rb_cs[3];
|
||||
|
||||
// quaternions and Cartesian unit vectors in lab frame
|
||||
double *qa,ax[3],ay[3],az[3];
|
||||
double *qb,bx[3],by[3],bz[3];
|
||||
double *special_lj = force->special_lj;
|
||||
// Cartesian unit vectors in lab frame
|
||||
double ax[3],ay[3],az[3];
|
||||
double bx[3],by[3],bz[3];
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
@ -100,10 +98,7 @@ void PairOxdna2Dh::compute(int eflag, int vflag)
|
||||
int nlocal = atom->nlocal;
|
||||
int newton_pair = force->newton_pair;
|
||||
int *alist,*blist,*numneigh,**firstneigh;
|
||||
|
||||
AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
|
||||
AtomVecEllipsoid::Bonus *bonus = avec->bonus;
|
||||
int *ellipsoid = atom->ellipsoid;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
int a,b,ia,ib,anum,bnum,atype,btype;
|
||||
|
||||
@ -115,6 +110,12 @@ void PairOxdna2Dh::compute(int eflag, int vflag)
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
// n(x/y/z)_xtrct = extracted local unit vectors from oxdna_excv
|
||||
int dim;
|
||||
nx_xtrct = (double **) force->pair->extract("nx",dim);
|
||||
ny_xtrct = (double **) force->pair->extract("ny",dim);
|
||||
nz_xtrct = (double **) force->pair->extract("nz",dim);
|
||||
|
||||
// loop over pair interaction neighbors of my atoms
|
||||
|
||||
for (ia = 0; ia < anum; ia++) {
|
||||
@ -122,8 +123,15 @@ void PairOxdna2Dh::compute(int eflag, int vflag)
|
||||
a = alist[ia];
|
||||
atype = type[a];
|
||||
|
||||
qa=bonus[ellipsoid[a]].quat;
|
||||
MathExtra::q_to_exyz(qa,ax,ay,az);
|
||||
ax[0] = nx_xtrct[a][0];
|
||||
ax[1] = nx_xtrct[a][1];
|
||||
ax[2] = nx_xtrct[a][2];
|
||||
ay[0] = ny_xtrct[a][0];
|
||||
ay[1] = ny_xtrct[a][1];
|
||||
ay[2] = ny_xtrct[a][2];
|
||||
az[0] = nz_xtrct[a][0];
|
||||
az[1] = nz_xtrct[a][1];
|
||||
az[2] = nz_xtrct[a][2];
|
||||
|
||||
// vector COM-backbone site a
|
||||
compute_interaction_sites(ax,ay,az,ra_cs);
|
||||
@ -142,8 +150,15 @@ void PairOxdna2Dh::compute(int eflag, int vflag)
|
||||
b &= NEIGHMASK;
|
||||
btype = type[b];
|
||||
|
||||
qb=bonus[ellipsoid[b]].quat;
|
||||
MathExtra::q_to_exyz(qb,bx,by,bz);
|
||||
bx[0] = nx_xtrct[b][0];
|
||||
bx[1] = nx_xtrct[b][1];
|
||||
bx[2] = nx_xtrct[b][2];
|
||||
by[0] = ny_xtrct[b][0];
|
||||
by[1] = ny_xtrct[b][1];
|
||||
by[2] = ny_xtrct[b][2];
|
||||
bz[0] = nz_xtrct[b][0];
|
||||
bz[1] = nz_xtrct[b][1];
|
||||
bz[2] = nz_xtrct[b][2];
|
||||
|
||||
// vector COM-backbone site b
|
||||
compute_interaction_sites(bx,by,bz,rb_cs);
|
||||
|
||||
@ -27,24 +27,25 @@ namespace LAMMPS_NS {
|
||||
class PairOxdna2Dh : public Pair {
|
||||
public:
|
||||
PairOxdna2Dh(class LAMMPS *);
|
||||
virtual ~PairOxdna2Dh();
|
||||
~PairOxdna2Dh() override;
|
||||
virtual void compute_interaction_sites(double *, double *, double *, double *);
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_list(int, class NeighList *);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
void *extract(const char *, int &);
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_list(int, class NeighList *) override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
protected:
|
||||
double **qeff_dh_pf, **kappa_dh;
|
||||
double **b_dh, **cut_dh_ast, **cutsq_dh_ast, **cut_dh_c, **cutsq_dh_c;
|
||||
double **nx_xtrct, **ny_xtrct, **nz_xtrct; // per-atom arrays for local unit vectors
|
||||
|
||||
virtual void allocate();
|
||||
};
|
||||
|
||||
@ -27,8 +27,8 @@ namespace LAMMPS_NS {
|
||||
class PairOxdna2Excv : public PairOxdnaExcv {
|
||||
public:
|
||||
PairOxdna2Excv(class LAMMPS *lmp) : PairOxdnaExcv(lmp) {}
|
||||
virtual ~PairOxdna2Excv() {}
|
||||
virtual void compute_interaction_sites(double *, double *, double *, double *, double *);
|
||||
|
||||
void compute_interaction_sites(double *, double *, double *, double *, double *) override;
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
#include "pair_oxdna_coaxstk.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "atom_vec_ellipsoid.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
@ -106,9 +105,8 @@ PairOxdnaCoaxstk::~PairOxdnaCoaxstk()
|
||||
|
||||
void PairOxdnaCoaxstk::compute(int eflag, int vflag)
|
||||
{
|
||||
|
||||
double delf[3],delt[3],delta[3],deltb[3]; // force, torque increment;
|
||||
double evdwl,fpair,finc,tpair,factor_lj;
|
||||
double evdwl,finc,tpair,factor_lj;
|
||||
double v1tmp[3],v2tmp[3],v3tmp[3];
|
||||
double delr_ss[3],delr_ss_norm[3],rsq_ss,r_ss,rinv_ss;
|
||||
double delr_st[3],delr_st_norm[3],rsq_st,r_st,rinv_st;
|
||||
@ -129,10 +127,9 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
|
||||
// vectors COM-backbone site, COM-stacking site in lab frame
|
||||
double ra_cs[3],ra_cst[3];
|
||||
double rb_cs[3],rb_cst[3];
|
||||
|
||||
// quaternions and Cartesian unit vectors in lab frame
|
||||
double *qa,ax[3],ay[3],az[3];
|
||||
double *qb,bx[3],by[3],bz[3];
|
||||
// Cartesian unit vectors in lab frame
|
||||
double ax[3],ay[3],az[3];
|
||||
double bx[3],bz[3];
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
@ -144,10 +141,6 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
|
||||
int *alist,*blist,*numneigh,**firstneigh;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
|
||||
AtomVecEllipsoid::Bonus *bonus = avec->bonus;
|
||||
int *ellipsoid = atom->ellipsoid;
|
||||
|
||||
int a,b,ia,ib,anum,bnum,atype,btype;
|
||||
|
||||
double f2,f4t1,f4t4,f4t5,f4t6,f5c3;
|
||||
@ -161,6 +154,12 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
// n(x/y/z)_xtrct = extracted local unit vectors in lab frame from oxdna_excv
|
||||
int dim;
|
||||
nx_xtrct = (double **) force->pair->extract("nx",dim);
|
||||
ny_xtrct = (double **) force->pair->extract("ny",dim);
|
||||
nz_xtrct = (double **) force->pair->extract("nz",dim);
|
||||
|
||||
// loop over pair interaction neighbors of my atoms
|
||||
|
||||
for (ia = 0; ia < anum; ia++) {
|
||||
@ -168,8 +167,10 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
|
||||
a = alist[ia];
|
||||
atype = type[a];
|
||||
|
||||
qa=bonus[ellipsoid[a]].quat;
|
||||
MathExtra::q_to_exyz(qa,ax,ay,az);
|
||||
ax[0] = nx_xtrct[a][0];
|
||||
ax[1] = nx_xtrct[a][1];
|
||||
ax[2] = nx_xtrct[a][2];
|
||||
// a(y/z) not needed here as oxDNA(1) co-linear
|
||||
|
||||
// vector COM a - stacking site a
|
||||
ra_cst[0] = d_cst*ax[0];
|
||||
@ -192,8 +193,10 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
|
||||
|
||||
btype = type[b];
|
||||
|
||||
qb=bonus[ellipsoid[b]].quat;
|
||||
MathExtra::q_to_exyz(qb,bx,by,bz);
|
||||
bx[0] = nx_xtrct[b][0];
|
||||
bx[1] = nx_xtrct[b][1];
|
||||
bx[2] = nx_xtrct[b][2];
|
||||
// b(y/z) not needed here as oxDNA(1) co-linear
|
||||
|
||||
// vector COM b - stacking site b
|
||||
rb_cst[0] = d_cst*bx[0];
|
||||
@ -245,6 +248,13 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
|
||||
// early rejection criterium
|
||||
if (f4t1) {
|
||||
|
||||
az[0] = nz_xtrct[a][0];
|
||||
az[1] = nz_xtrct[a][1];
|
||||
az[2] = nz_xtrct[a][2];
|
||||
bz[0] = nz_xtrct[b][0];
|
||||
bz[1] = nz_xtrct[b][1];
|
||||
bz[2] = nz_xtrct[b][2];
|
||||
|
||||
cost4 = MathExtra::dot3(az,bz);
|
||||
if (cost4 > 1.0) cost4 = 1.0;
|
||||
if (cost4 < -1.0) cost4 = -1.0;
|
||||
@ -330,8 +340,6 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
|
||||
|
||||
// force, torque and virial contribution for forces between stacking sites
|
||||
|
||||
fpair = 0.0;
|
||||
|
||||
delf[0] = 0.0;
|
||||
delf[1] = 0.0;
|
||||
delf[2] = 0.0;
|
||||
@ -346,7 +354,6 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
|
||||
|
||||
// radial force
|
||||
finc = -df2 * f4t1 * f4t4 * f4t5 * f4t6 * f5c3 * f5c3 * rinv_st * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += delr_st[0] * finc;
|
||||
delf[1] += delr_st[1] * finc;
|
||||
@ -356,7 +363,6 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
|
||||
if (theta5 && theta5p) {
|
||||
|
||||
finc = -f2 * f4t1 * f4t4 * df4t5 * f4t6 * f5c3 * f5c3 * rinv_st * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_st_norm[0]*cost5 - az[0]) * finc;
|
||||
delf[1] += (delr_st_norm[1]*cost5 - az[1]) * finc;
|
||||
@ -368,7 +374,6 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
|
||||
if (theta6 && theta6p) {
|
||||
|
||||
finc = -f2 * f4t1* f4t4 * f4t5 * df4t6 * f5c3 * f5c3 * rinv_st * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_st_norm[0]*cost6 - bz[0]) * finc;
|
||||
delf[1] += (delr_st_norm[1]*cost6 - bz[1]) * finc;
|
||||
@ -380,8 +385,11 @@ void PairOxdnaCoaxstk::compute(int eflag, int vflag)
|
||||
// cosphi3 and cosphi4 (=cosphi3) force and virial
|
||||
if (cosphi3) {
|
||||
|
||||
ay[0] = ny_xtrct[a][0];
|
||||
ay[1] = ny_xtrct[a][1];
|
||||
ay[2] = ny_xtrct[a][2];
|
||||
|
||||
finc = -f2 * f4t1* f4t4 * f4t5 * f4t6 * 2.0 * f5c3 * df5c3 * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
gamma = d_cs - d_cst;
|
||||
gammacub = gamma * gamma * gamma;
|
||||
|
||||
@ -28,40 +28,36 @@ namespace LAMMPS_NS {
|
||||
class PairOxdnaCoaxstk : public Pair {
|
||||
public:
|
||||
PairOxdnaCoaxstk(class LAMMPS *);
|
||||
virtual ~PairOxdnaCoaxstk();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_list(int, class NeighList *);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
void *extract(const char *, int &);
|
||||
~PairOxdnaCoaxstk() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_list(int, class NeighList *) override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
protected:
|
||||
// coaxial stacking interaction
|
||||
double **k_cxst, **cut_cxst_0, **cut_cxst_c, **cut_cxst_lo, **cut_cxst_hi;
|
||||
double **cut_cxst_lc, **cut_cxst_hc, **b_cxst_lo, **b_cxst_hi;
|
||||
double **cutsq_cxst_hc;
|
||||
|
||||
double **a_cxst1, **theta_cxst1_0, **dtheta_cxst1_ast;
|
||||
double **b_cxst1, **dtheta_cxst1_c;
|
||||
|
||||
double **a_cxst4, **theta_cxst4_0, **dtheta_cxst4_ast;
|
||||
double **b_cxst4, **dtheta_cxst4_c;
|
||||
|
||||
double **a_cxst5, **theta_cxst5_0, **dtheta_cxst5_ast;
|
||||
double **b_cxst5, **dtheta_cxst5_c;
|
||||
|
||||
double **a_cxst6, **theta_cxst6_0, **dtheta_cxst6_ast;
|
||||
double **b_cxst6, **dtheta_cxst6_c;
|
||||
|
||||
double **a_cxst3p, **cosphi_cxst3p_ast, **b_cxst3p, **cosphi_cxst3p_c;
|
||||
double **a_cxst4p, **cosphi_cxst4p_ast, **b_cxst4p, **cosphi_cxst4p_c;
|
||||
double **nx_xtrct, **ny_xtrct, **nz_xtrct; // per-atom arrays for local unit vectors
|
||||
|
||||
virtual void allocate();
|
||||
};
|
||||
|
||||
@ -39,6 +39,9 @@ PairOxdnaExcv::PairOxdnaExcv(LAMMPS *lmp) : Pair(lmp)
|
||||
{
|
||||
single_enable = 0;
|
||||
writedata = 1;
|
||||
|
||||
// set comm size needed by this Pair
|
||||
comm_forward = 9;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
@ -47,6 +50,10 @@ PairOxdnaExcv::~PairOxdnaExcv()
|
||||
{
|
||||
if (allocated) {
|
||||
|
||||
memory->destroy(nx);
|
||||
memory->destroy(ny);
|
||||
memory->destroy(nz);
|
||||
|
||||
memory->destroy(setflag);
|
||||
memory->destroy(cutsq);
|
||||
|
||||
@ -108,7 +115,6 @@ void PairOxdnaExcv::compute_interaction_sites(double e1[3], double /*e2*/[3],
|
||||
|
||||
void PairOxdnaExcv::compute(int eflag, int vflag)
|
||||
{
|
||||
|
||||
double delf[3],delta[3],deltb[3]; // force, torque increment;
|
||||
double evdwl,fpair,factor_lj;
|
||||
double rtmp_s[3],rtmp_b[3];
|
||||
@ -118,10 +124,10 @@ void PairOxdnaExcv::compute(int eflag, int vflag)
|
||||
// vectors COM-backbone site, COM-base site in lab frame
|
||||
double ra_cs[3],ra_cb[3];
|
||||
double rb_cs[3],rb_cb[3];
|
||||
// Cartesian unit vectors in lab frame
|
||||
double ax[3],ay[3],az[3];
|
||||
double bx[3],by[3],bz[3];
|
||||
|
||||
// quaternions and Cartesian unit vectors in lab frame
|
||||
double *qa,ax[3],ay[3],az[3];
|
||||
double *qb,bx[3],by[3],bz[3];
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
double **x = atom->x;
|
||||
@ -137,7 +143,7 @@ void PairOxdnaExcv::compute(int eflag, int vflag)
|
||||
AtomVecEllipsoid::Bonus *bonus = avec->bonus;
|
||||
int *ellipsoid = atom->ellipsoid;
|
||||
|
||||
int a,b,ia,ib,anum,bnum,atype,btype;
|
||||
int a,b,in,ia,ib,anum,bnum,atype,btype;
|
||||
|
||||
evdwl = 0.0;
|
||||
ev_init(eflag,vflag);
|
||||
@ -147,6 +153,29 @@ void PairOxdnaExcv::compute(int eflag, int vflag)
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
// loop over all local atoms, calculation of local reference frame
|
||||
for (in = 0; in < atom->nlocal; in++) {
|
||||
|
||||
int n = alist[in];
|
||||
double *qn,nx_temp[3],ny_temp[3],nz_temp[3]; // quaternion and Cartesian unit vectors in lab frame
|
||||
|
||||
qn=bonus[ellipsoid[n]].quat;
|
||||
MathExtra::q_to_exyz(qn,nx_temp,ny_temp,nz_temp);
|
||||
|
||||
nx[n][0] = nx_temp[0];
|
||||
nx[n][1] = nx_temp[1];
|
||||
nx[n][2] = nx_temp[2];
|
||||
ny[n][0] = ny_temp[0];
|
||||
ny[n][1] = ny_temp[1];
|
||||
ny[n][2] = ny_temp[2];
|
||||
nz[n][0] = nz_temp[0];
|
||||
nz[n][1] = nz_temp[1];
|
||||
nz[n][2] = nz_temp[2];
|
||||
|
||||
}
|
||||
|
||||
comm->forward_comm_pair(this);
|
||||
|
||||
// loop over pair interaction neighbors of my atoms
|
||||
|
||||
for (ia = 0; ia < anum; ia++) {
|
||||
@ -154,8 +183,15 @@ void PairOxdnaExcv::compute(int eflag, int vflag)
|
||||
a = alist[ia];
|
||||
atype = type[a];
|
||||
|
||||
qa=bonus[ellipsoid[a]].quat;
|
||||
MathExtra::q_to_exyz(qa,ax,ay,az);
|
||||
ax[0] = nx[a][0];
|
||||
ax[1] = nx[a][1];
|
||||
ax[2] = nx[a][2];
|
||||
ay[0] = ny[a][0];
|
||||
ay[1] = ny[a][1];
|
||||
ay[2] = ny[a][2];
|
||||
az[0] = nz[a][0];
|
||||
az[1] = nz[a][1];
|
||||
az[2] = nz[a][2];
|
||||
|
||||
// vector COM - backbone and base site a
|
||||
compute_interaction_sites(ax,ay,az,ra_cs,ra_cb);
|
||||
@ -179,8 +215,15 @@ void PairOxdnaExcv::compute(int eflag, int vflag)
|
||||
|
||||
btype = type[b];
|
||||
|
||||
qb=bonus[ellipsoid[b]].quat;
|
||||
MathExtra::q_to_exyz(qb,bx,by,bz);
|
||||
bx[0] = nx[b][0];
|
||||
bx[1] = nx[b][1];
|
||||
bx[2] = nx[b][2];
|
||||
by[0] = ny[b][0];
|
||||
by[1] = ny[b][1];
|
||||
by[2] = ny[b][2];
|
||||
bz[0] = nz[b][0];
|
||||
bz[1] = nz[b][1];
|
||||
bz[2] = nz[b][2];
|
||||
|
||||
// vector COM - backbone and base site b
|
||||
compute_interaction_sites(bx,by,bz,rb_cs,rb_cb);
|
||||
@ -400,6 +443,10 @@ void PairOxdnaExcv::allocate()
|
||||
for (int j = i; j <= n; j++)
|
||||
setflag[i][j] = 0;
|
||||
|
||||
memory->create(nx,atom->nmax,3,"pair:nx");
|
||||
memory->create(ny,atom->nmax,3,"pair:ny");
|
||||
memory->create(nz,atom->nmax,3,"pair:nz");
|
||||
|
||||
memory->create(cutsq,n+1,n+1,"pair:cutsq");
|
||||
|
||||
memory->create(epsilon_ss,n+1,n+1,"pair:epsilon_ss");
|
||||
@ -806,10 +853,58 @@ void PairOxdnaExcv::write_data_all(FILE *fp)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int PairOxdnaExcv::pack_forward_comm(int n, int *list, double *buf,
|
||||
int /*pbc_flag*/, int * /*pbc*/)
|
||||
{
|
||||
int i,j,m;
|
||||
|
||||
m = 0;
|
||||
for (i = 0; i < n; i++) {
|
||||
j = list[i];
|
||||
buf[m++] = nx[j][0];
|
||||
buf[m++] = nx[j][1];
|
||||
buf[m++] = nx[j][2];
|
||||
buf[m++] = ny[j][0];
|
||||
buf[m++] = ny[j][1];
|
||||
buf[m++] = ny[j][2];
|
||||
buf[m++] = nz[j][0];
|
||||
buf[m++] = nz[j][1];
|
||||
buf[m++] = nz[j][2];
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void PairOxdnaExcv::unpack_forward_comm(int n, int first, double *buf)
|
||||
{
|
||||
int i,m,last;
|
||||
|
||||
m = 0;
|
||||
last = first + n;
|
||||
for (i = first; i < last; i++) {
|
||||
nx[i][0] = buf[m++];
|
||||
nx[i][1] = buf[m++];
|
||||
nx[i][2] = buf[m++];
|
||||
ny[i][0] = buf[m++];
|
||||
ny[i][1] = buf[m++];
|
||||
ny[i][2] = buf[m++];
|
||||
nz[i][0] = buf[m++];
|
||||
nz[i][1] = buf[m++];
|
||||
nz[i][2] = buf[m++];
|
||||
}
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
void *PairOxdnaExcv::extract(const char *str, int &dim)
|
||||
{
|
||||
dim = 2;
|
||||
|
||||
if (strcmp(str,"nx") == 0) return (void *) nx;
|
||||
if (strcmp(str,"ny") == 0) return (void *) ny;
|
||||
if (strcmp(str,"nz") == 0) return (void *) nz;
|
||||
|
||||
if (strcmp(str,"epsilon_ss") == 0) return (void *) epsilon_ss;
|
||||
if (strcmp(str,"sigma_ss") == 0) return (void *) sigma_ss;
|
||||
if (strcmp(str,"cut_ss_ast") == 0) return (void *) cut_ss_ast;
|
||||
|
||||
@ -27,20 +27,22 @@ namespace LAMMPS_NS {
|
||||
class PairOxdnaExcv : public Pair {
|
||||
public:
|
||||
PairOxdnaExcv(class LAMMPS *);
|
||||
virtual ~PairOxdnaExcv();
|
||||
~PairOxdnaExcv() override;
|
||||
virtual void compute_interaction_sites(double *, double *, double *, double *, double *);
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_list(int, class NeighList *);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
void *extract(const char *, int &);
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_list(int, class NeighList *) override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
void *extract(const char *, int &) override;
|
||||
int pack_forward_comm(int, int *, double *, int, int *) override;
|
||||
void unpack_forward_comm(int, int, double *) override;
|
||||
|
||||
protected:
|
||||
// s=sugar-phosphate backbone site, b=base site, st=stacking site
|
||||
@ -52,6 +54,7 @@ class PairOxdnaExcv : public Pair {
|
||||
double **lj1_sb, **lj2_sb, **b_sb, **cut_sb_c, **cutsq_sb_c;
|
||||
double **epsilon_bb, **sigma_bb, **cut_bb_ast, **cutsq_bb_ast;
|
||||
double **lj1_bb, **lj2_bb, **b_bb, **cut_bb_c, **cutsq_bb_c;
|
||||
double **nx, **ny, **nz; // per-atom arrays for local unit vectors
|
||||
|
||||
virtual void allocate();
|
||||
};
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
#include "pair_oxdna_hbond.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "atom_vec_ellipsoid.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
@ -135,7 +134,7 @@ void PairOxdnaHbond::compute(int eflag, int vflag)
|
||||
{
|
||||
|
||||
double delf[3],delta[3],deltb[3]; // force, torque increment;
|
||||
double evdwl,fpair,finc,tpair,factor_lj;
|
||||
double evdwl,finc,tpair,factor_lj;
|
||||
double delr_hb[3],delr_hb_norm[3],rsq_hb,r_hb,rinv_hb;
|
||||
double theta1,t1dir[3],cost1;
|
||||
double theta2,t2dir[3],cost2;
|
||||
@ -148,10 +147,9 @@ void PairOxdnaHbond::compute(int eflag, int vflag)
|
||||
double d_chb=+0.4;
|
||||
// vectors COM-h-bonding site in lab frame
|
||||
double ra_chb[3],rb_chb[3];
|
||||
|
||||
// quaternions and Cartesian unit vectors in lab frame
|
||||
double *qa,ax[3],ay[3],az[3];
|
||||
double *qb,bx[3],by[3],bz[3];
|
||||
// Cartesian unit vectors in lab frame
|
||||
double ax[3],az[3];
|
||||
double bx[3],bz[3];
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
@ -163,10 +161,6 @@ void PairOxdnaHbond::compute(int eflag, int vflag)
|
||||
int *alist,*blist,*numneigh,**firstneigh;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
|
||||
AtomVecEllipsoid::Bonus *bonus = avec->bonus;
|
||||
int *ellipsoid = atom->ellipsoid;
|
||||
|
||||
int a,b,ia,ib,anum,bnum,atype,btype;
|
||||
|
||||
double f1,f4t1,f4t4,f4t2,f4t3,f4t7,f4t8;
|
||||
@ -180,6 +174,12 @@ void PairOxdnaHbond::compute(int eflag, int vflag)
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
// n(x/y/z)_xtrct = extracted local unit vectors from oxdna_excv
|
||||
int dim;
|
||||
nx_xtrct = (double **) force->pair->extract("nx",dim);
|
||||
ny_xtrct = (double **) force->pair->extract("ny",dim);
|
||||
nz_xtrct = (double **) force->pair->extract("nz",dim);
|
||||
|
||||
// loop over pair interaction neighbors of my atoms
|
||||
|
||||
for (ia = 0; ia < anum; ia++) {
|
||||
@ -187,8 +187,9 @@ void PairOxdnaHbond::compute(int eflag, int vflag)
|
||||
a = alist[ia];
|
||||
atype = type[a];
|
||||
|
||||
qa=bonus[ellipsoid[a]].quat;
|
||||
MathExtra::q_to_exyz(qa,ax,ay,az);
|
||||
ax[0] = nx_xtrct[a][0];
|
||||
ax[1] = nx_xtrct[a][1];
|
||||
ax[2] = nx_xtrct[a][2];
|
||||
|
||||
ra_chb[0] = d_chb*ax[0];
|
||||
ra_chb[1] = d_chb*ax[1];
|
||||
@ -205,8 +206,9 @@ void PairOxdnaHbond::compute(int eflag, int vflag)
|
||||
|
||||
btype = type[b];
|
||||
|
||||
qb=bonus[ellipsoid[b]].quat;
|
||||
MathExtra::q_to_exyz(qb,bx,by,bz);
|
||||
bx[0] = nx_xtrct[b][0];
|
||||
bx[1] = nx_xtrct[b][1];
|
||||
bx[2] = nx_xtrct[b][2];
|
||||
|
||||
rb_chb[0] = d_chb*bx[0];
|
||||
rb_chb[1] = d_chb*bx[1];
|
||||
@ -265,6 +267,13 @@ void PairOxdnaHbond::compute(int eflag, int vflag)
|
||||
// early rejection criterium
|
||||
if (f4t3) {
|
||||
|
||||
az[0] = nz_xtrct[a][0];
|
||||
az[1] = nz_xtrct[a][1];
|
||||
az[2] = nz_xtrct[a][2];
|
||||
bz[0] = nz_xtrct[b][0];
|
||||
bz[1] = nz_xtrct[b][1];
|
||||
bz[2] = nz_xtrct[b][2];
|
||||
|
||||
cost4 = MathExtra::dot3(az,bz);
|
||||
if (cost4 > 1.0) cost4 = 1.0;
|
||||
if (cost4 < -1.0) cost4 = -1.0;
|
||||
@ -324,8 +333,6 @@ void PairOxdnaHbond::compute(int eflag, int vflag)
|
||||
|
||||
// force, torque and virial contribution for forces between h-bonding sites
|
||||
|
||||
fpair = 0.0;
|
||||
|
||||
delf[0] = 0.0;
|
||||
delf[1] = 0.0;
|
||||
delf[2] = 0.0;
|
||||
@ -340,7 +347,6 @@ void PairOxdnaHbond::compute(int eflag, int vflag)
|
||||
|
||||
// radial force
|
||||
finc = -df1 * f4t1 * f4t2 * f4t3 * f4t4 * f4t7 * f4t8 * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += delr_hb[0] * finc;
|
||||
delf[1] += delr_hb[1] * finc;
|
||||
@ -350,7 +356,6 @@ void PairOxdnaHbond::compute(int eflag, int vflag)
|
||||
if (theta2) {
|
||||
|
||||
finc = -f1 * f4t1 * df4t2 * f4t3 * f4t4 * f4t7 * f4t8 * rinv_hb * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_hb_norm[0]*cost2 + ax[0]) * finc;
|
||||
delf[1] += (delr_hb_norm[1]*cost2 + ax[1]) * finc;
|
||||
@ -362,7 +367,6 @@ void PairOxdnaHbond::compute(int eflag, int vflag)
|
||||
if (theta3) {
|
||||
|
||||
finc = -f1 * f4t1 * f4t2 * df4t3 * f4t4 * f4t7 * f4t8 * rinv_hb * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_hb_norm[0]*cost3 - bx[0]) * finc;
|
||||
delf[1] += (delr_hb_norm[1]*cost3 - bx[1]) * finc;
|
||||
@ -374,7 +378,6 @@ void PairOxdnaHbond::compute(int eflag, int vflag)
|
||||
if (theta7) {
|
||||
|
||||
finc = -f1 * f4t1 * f4t2 * f4t3 * f4t4 * df4t7 * f4t8 * rinv_hb * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_hb_norm[0]*cost7 + az[0]) * finc;
|
||||
delf[1] += (delr_hb_norm[1]*cost7 + az[1]) * finc;
|
||||
@ -386,7 +389,6 @@ void PairOxdnaHbond::compute(int eflag, int vflag)
|
||||
if (theta8) {
|
||||
|
||||
finc = -f1 * f4t1 * f4t2 * f4t3 * f4t4 * f4t7 * df4t8 * rinv_hb * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_hb_norm[0]*cost8 - bz[0]) * finc;
|
||||
delf[1] += (delr_hb_norm[1]*cost8 - bz[1]) * finc;
|
||||
|
||||
@ -28,19 +28,19 @@ namespace LAMMPS_NS {
|
||||
class PairOxdnaHbond : public Pair {
|
||||
public:
|
||||
PairOxdnaHbond(class LAMMPS *);
|
||||
virtual ~PairOxdnaHbond();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_list(int, class NeighList *);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
void *extract(const char *, int &);
|
||||
~PairOxdnaHbond() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_list(int, class NeighList *) override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
protected:
|
||||
// h-bonding interaction
|
||||
@ -48,25 +48,19 @@ class PairOxdnaHbond : public Pair {
|
||||
double **epsilon_hb, **a_hb, **cut_hb_0, **cut_hb_c, **cut_hb_lo, **cut_hb_hi;
|
||||
double **cut_hb_lc, **cut_hb_hc, **b_hb_lo, **b_hb_hi, **shift_hb;
|
||||
double **cutsq_hb_hc;
|
||||
|
||||
double **a_hb1, **theta_hb1_0, **dtheta_hb1_ast;
|
||||
double **b_hb1, **dtheta_hb1_c;
|
||||
|
||||
double **a_hb2, **theta_hb2_0, **dtheta_hb2_ast;
|
||||
double **b_hb2, **dtheta_hb2_c;
|
||||
|
||||
double **a_hb3, **theta_hb3_0, **dtheta_hb3_ast;
|
||||
double **b_hb3, **dtheta_hb3_c;
|
||||
|
||||
double **a_hb4, **theta_hb4_0, **dtheta_hb4_ast;
|
||||
double **b_hb4, **dtheta_hb4_c;
|
||||
|
||||
double **a_hb7, **theta_hb7_0, **dtheta_hb7_ast;
|
||||
double **b_hb7, **dtheta_hb7_c;
|
||||
|
||||
double **a_hb8, **theta_hb8_0, **dtheta_hb8_ast;
|
||||
double **b_hb8, **dtheta_hb8_c;
|
||||
|
||||
double **nx_xtrct, **ny_xtrct, **nz_xtrct; // per-atom arrays for local unit vectors
|
||||
int seqdepflag;
|
||||
|
||||
virtual void allocate();
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
#include "pair_oxdna_stk.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "atom_vec_ellipsoid.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
@ -212,9 +211,8 @@ void PairOxdnaStk::ev_tally_xyz(int i, int j, int nlocal, int newton_bond,
|
||||
|
||||
void PairOxdnaStk::compute(int eflag, int vflag)
|
||||
{
|
||||
|
||||
double delf[3],delta[3],deltb[3]; // force, torque increment;
|
||||
double evdwl,fpair,finc,tpair;
|
||||
double evdwl,finc,tpair;
|
||||
double delr_ss[3],delr_ss_norm[3],rsq_ss,r_ss,rinv_ss;
|
||||
double delr_st[3],delr_st_norm[3],rsq_st,r_st,rinv_st;
|
||||
double theta4,t4dir[3],cost4;
|
||||
@ -227,10 +225,9 @@ void PairOxdnaStk::compute(int eflag, int vflag)
|
||||
// vectors COM-backbone site, COM-stacking site in lab frame
|
||||
double ra_cs[3],ra_cst[3];
|
||||
double rb_cs[3],rb_cst[3];
|
||||
|
||||
// quaternions and Cartesian unit vectors in lab frame
|
||||
double *qa,ax[3],ay[3],az[3];
|
||||
double *qb,bx[3],by[3],bz[3];
|
||||
// Cartesian unit vectors in lab frame
|
||||
double ax[3],ay[3],az[3];
|
||||
double bx[3],by[3],bz[3];
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
@ -245,10 +242,6 @@ void PairOxdnaStk::compute(int eflag, int vflag)
|
||||
|
||||
tagint *id5p = atom->id5p;
|
||||
|
||||
AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
|
||||
AtomVecEllipsoid::Bonus *bonus = avec->bonus;
|
||||
int *ellipsoid = atom->ellipsoid;
|
||||
|
||||
int a,b,btemp,in,atype,btype;
|
||||
|
||||
double f1,f4t4,f4t5,f4t6,f5c1,f5c2;
|
||||
@ -257,6 +250,12 @@ void PairOxdnaStk::compute(int eflag, int vflag)
|
||||
evdwl = 0.0;
|
||||
ev_init(eflag,vflag);
|
||||
|
||||
// n(x/y/z)_xtrct = extracted local unit vectors from oxdna_excv
|
||||
int dim;
|
||||
nx_xtrct = (double **) force->pair->extract("nx",dim);
|
||||
ny_xtrct = (double **) force->pair->extract("ny",dim);
|
||||
nz_xtrct = (double **) force->pair->extract("nz",dim);
|
||||
|
||||
// loop over stacking interaction neighbors using bond topology
|
||||
|
||||
for (in = 0; in < nbondlist; in++) {
|
||||
@ -275,10 +274,13 @@ void PairOxdnaStk::compute(int eflag, int vflag)
|
||||
|
||||
// a now in 3' direction, b in 5' direction
|
||||
|
||||
qa=bonus[ellipsoid[a]].quat;
|
||||
MathExtra::q_to_exyz(qa,ax,ay,az);
|
||||
qb=bonus[ellipsoid[b]].quat;
|
||||
MathExtra::q_to_exyz(qb,bx,by,bz);
|
||||
ax[0] = nx_xtrct[a][0];
|
||||
ax[1] = nx_xtrct[a][1];
|
||||
ax[2] = nx_xtrct[a][2];
|
||||
bx[0] = nx_xtrct[b][0];
|
||||
bx[1] = nx_xtrct[b][1];
|
||||
bx[2] = nx_xtrct[b][2];
|
||||
// (a/b)y/z not needed here as oxDNA(1) co-linear
|
||||
|
||||
// vector COM a - stacking site a
|
||||
ra_cst[0] = d_cst*ax[0];
|
||||
@ -336,6 +338,13 @@ void PairOxdnaStk::compute(int eflag, int vflag)
|
||||
// early rejection criterium
|
||||
if (f1) {
|
||||
|
||||
az[0] = nz_xtrct[a][0];
|
||||
az[1] = nz_xtrct[a][1];
|
||||
az[2] = nz_xtrct[a][2];
|
||||
bz[0] = nz_xtrct[b][0];
|
||||
bz[1] = nz_xtrct[b][1];
|
||||
bz[2] = nz_xtrct[b][2];
|
||||
|
||||
// theta4 angle and correction
|
||||
cost4 = MathExtra::dot3(bz,az);
|
||||
if (cost4 > 1.0) cost4 = 1.0;
|
||||
@ -360,6 +369,13 @@ void PairOxdnaStk::compute(int eflag, int vflag)
|
||||
// early rejection criterium
|
||||
if (f4t5) {
|
||||
|
||||
ay[0] = ny_xtrct[a][0];
|
||||
ay[1] = ny_xtrct[a][1];
|
||||
ay[2] = ny_xtrct[a][2];
|
||||
by[0] = ny_xtrct[b][0];
|
||||
by[1] = ny_xtrct[b][1];
|
||||
by[2] = ny_xtrct[b][2];
|
||||
|
||||
cost6p = MathExtra::dot3(delr_st_norm,az);
|
||||
if (cost6p > 1.0) cost6p = 1.0;
|
||||
if (cost6p < -1.0) cost6p = -1.0;
|
||||
@ -409,8 +425,6 @@ void PairOxdnaStk::compute(int eflag, int vflag)
|
||||
|
||||
// force, torque and virial contribution for forces between stacking sites
|
||||
|
||||
fpair = 0.0;
|
||||
|
||||
delf[0] = 0.0;
|
||||
delf[1] = 0.0;
|
||||
delf[2] = 0.0;
|
||||
@ -425,7 +439,6 @@ void PairOxdnaStk::compute(int eflag, int vflag)
|
||||
|
||||
// radial force
|
||||
finc = -df1 * f4t4 * f4t5 * f4t6 * f5c1 * f5c2;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += delr_st[0] * finc;
|
||||
delf[1] += delr_st[1] * finc;
|
||||
@ -435,7 +448,6 @@ void PairOxdnaStk::compute(int eflag, int vflag)
|
||||
if (theta5p) {
|
||||
|
||||
finc = -f1 * f4t4 * df4t5 * f4t6 * f5c1 * f5c2 * rinv_st;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_st_norm[0]*cost5p - bz[0]) * finc;
|
||||
delf[1] += (delr_st_norm[1]*cost5p - bz[1]) * finc;
|
||||
@ -447,7 +459,6 @@ void PairOxdnaStk::compute(int eflag, int vflag)
|
||||
if (theta6p) {
|
||||
|
||||
finc = -f1 * f4t4 * f4t5 * df4t6 * f5c1 * f5c2 * rinv_st;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_st_norm[0]*cost6p - az[0]) * finc;
|
||||
delf[1] += (delr_st_norm[1]*cost6p - az[1]) * finc;
|
||||
@ -499,8 +510,6 @@ void PairOxdnaStk::compute(int eflag, int vflag)
|
||||
|
||||
// force, torque and virial contribution for forces between backbone sites
|
||||
|
||||
fpair = 0.0;
|
||||
|
||||
delf[0] = 0.0;
|
||||
delf[1] = 0.0;
|
||||
delf[2] = 0.0;
|
||||
@ -517,7 +526,6 @@ void PairOxdnaStk::compute(int eflag, int vflag)
|
||||
if (cosphi1) {
|
||||
|
||||
finc = -f1 * f4t4 * f4t5 * f4t6 * df5c1 * f5c2 * rinv_ss;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_ss_norm[0]*cosphi1 - by[0]) * finc;
|
||||
delf[1] += (delr_ss_norm[1]*cosphi1 - by[1]) * finc;
|
||||
@ -529,7 +537,6 @@ void PairOxdnaStk::compute(int eflag, int vflag)
|
||||
if (cosphi2) {
|
||||
|
||||
finc = -f1 * f4t4 * f4t5 * f4t6 * f5c1 * df5c2 * rinv_ss;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_ss_norm[0]*cosphi2 - ay[0]) * finc;
|
||||
delf[1] += (delr_ss_norm[1]*cosphi2 - ay[1]) * finc;
|
||||
|
||||
@ -28,20 +28,20 @@ namespace LAMMPS_NS {
|
||||
class PairOxdnaStk : public Pair {
|
||||
public:
|
||||
PairOxdnaStk(class LAMMPS *);
|
||||
virtual ~PairOxdnaStk();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_style();
|
||||
void init_list(int, class NeighList *);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
void *extract(const char *, int &);
|
||||
~PairOxdnaStk() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
void init_list(int, class NeighList *) override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
protected:
|
||||
// stacking interaction
|
||||
@ -59,7 +59,7 @@ class PairOxdnaStk : public Pair {
|
||||
double **b_st6, **dtheta_st6_c;
|
||||
double **a_st1, **cosphi_st1_ast, **b_st1, **cosphi_st1_c;
|
||||
double **a_st2, **cosphi_st2_ast, **b_st2, **cosphi_st2_c;
|
||||
|
||||
double **nx_xtrct, **ny_xtrct, **nz_xtrct; // per-atom arrays for local unit vectors
|
||||
int seqdepflag;
|
||||
|
||||
virtual void allocate();
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
#include "pair_oxdna_xstk.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "atom_vec_ellipsoid.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
@ -111,9 +110,8 @@ PairOxdnaXstk::~PairOxdnaXstk()
|
||||
|
||||
void PairOxdnaXstk::compute(int eflag, int vflag)
|
||||
{
|
||||
|
||||
double delf[3],delta[3],deltb[3]; // force, torque increment;
|
||||
double evdwl,fpair,finc,tpair,factor_lj;
|
||||
double evdwl,finc,tpair,factor_lj;
|
||||
double delr_hb[3],delr_hb_norm[3],rsq_hb,r_hb,rinv_hb;
|
||||
double theta1,t1dir[3],cost1;
|
||||
double theta2,t2dir[3],cost2;
|
||||
@ -126,10 +124,9 @@ void PairOxdnaXstk::compute(int eflag, int vflag)
|
||||
double d_chb=+0.4;
|
||||
// vectors COM-h-bonding site in lab frame
|
||||
double ra_chb[3],rb_chb[3];
|
||||
|
||||
// quaternions and Cartesian unit vectors in lab frame
|
||||
double *qa,ax[3],ay[3],az[3];
|
||||
double *qb,bx[3],by[3],bz[3];
|
||||
// Cartesian unit vectors in lab frame
|
||||
double ax[3],az[3];
|
||||
double bx[3],bz[3];
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
@ -141,10 +138,6 @@ void PairOxdnaXstk::compute(int eflag, int vflag)
|
||||
int *alist,*blist,*numneigh,**firstneigh;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
|
||||
AtomVecEllipsoid::Bonus *bonus = avec->bonus;
|
||||
int *ellipsoid = atom->ellipsoid;
|
||||
|
||||
int a,b,ia,ib,anum,bnum,atype,btype;
|
||||
|
||||
double f2,f4t1,f4t4,f4t2,f4t3,f4t7,f4t8;
|
||||
@ -158,6 +151,12 @@ void PairOxdnaXstk::compute(int eflag, int vflag)
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
// n(x/y/z)_xtrct = extracted local unit vectors from oxdna_excv
|
||||
int dim;
|
||||
nx_xtrct = (double **) force->pair->extract("nx",dim);
|
||||
ny_xtrct = (double **) force->pair->extract("ny",dim);
|
||||
nz_xtrct = (double **) force->pair->extract("nz",dim);
|
||||
|
||||
// loop over pair interaction neighbors of my atoms
|
||||
|
||||
for (ia = 0; ia < anum; ia++) {
|
||||
@ -165,8 +164,10 @@ void PairOxdnaXstk::compute(int eflag, int vflag)
|
||||
a = alist[ia];
|
||||
atype = type[a];
|
||||
|
||||
qa=bonus[ellipsoid[a]].quat;
|
||||
MathExtra::q_to_exyz(qa,ax,ay,az);
|
||||
ax[0] = nx_xtrct[a][0];
|
||||
ax[1] = nx_xtrct[a][1];
|
||||
ax[2] = nx_xtrct[a][2];
|
||||
// a(y/z) not needed here as oxDNA(1) co-linear
|
||||
|
||||
ra_chb[0] = d_chb*ax[0];
|
||||
ra_chb[1] = d_chb*ax[1];
|
||||
@ -183,8 +184,10 @@ void PairOxdnaXstk::compute(int eflag, int vflag)
|
||||
|
||||
btype = type[b];
|
||||
|
||||
qb=bonus[ellipsoid[b]].quat;
|
||||
MathExtra::q_to_exyz(qb,bx,by,bz);
|
||||
bx[0] = nx_xtrct[b][0];
|
||||
bx[1] = nx_xtrct[b][1];
|
||||
bx[2] = nx_xtrct[b][2];
|
||||
// b(y/z) not needed here as oxDNA(1) co-linear
|
||||
|
||||
rb_chb[0] = d_chb*bx[0];
|
||||
rb_chb[1] = d_chb*bx[1];
|
||||
@ -243,6 +246,13 @@ void PairOxdnaXstk::compute(int eflag, int vflag)
|
||||
// early rejection criterium
|
||||
if (f4t3) {
|
||||
|
||||
az[0] = nz_xtrct[a][0];
|
||||
az[1] = nz_xtrct[a][1];
|
||||
az[2] = nz_xtrct[a][2];
|
||||
bz[0] = nz_xtrct[b][0];
|
||||
bz[1] = nz_xtrct[b][1];
|
||||
bz[2] = nz_xtrct[b][2];
|
||||
|
||||
cost4 = MathExtra::dot3(az,bz);
|
||||
if (cost4 > 1.0) cost4 = 1.0;
|
||||
if (cost4 < -1.0) cost4 = -1.0;
|
||||
@ -322,8 +332,6 @@ void PairOxdnaXstk::compute(int eflag, int vflag)
|
||||
|
||||
// force, torque and virial contribution for forces between h-bonding sites
|
||||
|
||||
fpair = 0.0;
|
||||
|
||||
delf[0] = 0.0;
|
||||
delf[1] = 0.0;
|
||||
delf[2] = 0.0;
|
||||
@ -338,7 +346,6 @@ void PairOxdnaXstk::compute(int eflag, int vflag)
|
||||
|
||||
// radial force
|
||||
finc = -df2 * f4t1 * f4t2 * f4t3 * f4t4 * f4t7 * f4t8 * rinv_hb *factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += delr_hb[0] * finc;
|
||||
delf[1] += delr_hb[1] * finc;
|
||||
@ -348,7 +355,6 @@ void PairOxdnaXstk::compute(int eflag, int vflag)
|
||||
if (theta2) {
|
||||
|
||||
finc = -f2 * f4t1 * df4t2 * f4t3 * f4t4 * f4t7 * f4t8 * rinv_hb * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_hb_norm[0]*cost2 + ax[0]) * finc;
|
||||
delf[1] += (delr_hb_norm[1]*cost2 + ax[1]) * finc;
|
||||
@ -360,7 +366,6 @@ void PairOxdnaXstk::compute(int eflag, int vflag)
|
||||
if (theta3) {
|
||||
|
||||
finc = -f2 * f4t1 * f4t2 * df4t3 * f4t4 * f4t7 * f4t8 * rinv_hb * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_hb_norm[0]*cost3 - bx[0]) * finc;
|
||||
delf[1] += (delr_hb_norm[1]*cost3 - bx[1]) * finc;
|
||||
@ -372,7 +377,6 @@ void PairOxdnaXstk::compute(int eflag, int vflag)
|
||||
if (theta7) {
|
||||
|
||||
finc = -f2 * f4t1 * f4t2 * f4t3 * f4t4 * df4t7 * f4t8 * rinv_hb * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_hb_norm[0]*cost7 + az[0]) * finc;
|
||||
delf[1] += (delr_hb_norm[1]*cost7 + az[1]) * finc;
|
||||
@ -384,7 +388,6 @@ void PairOxdnaXstk::compute(int eflag, int vflag)
|
||||
if (theta8) {
|
||||
|
||||
finc = -f2 * f4t1 * f4t2 * f4t3 * f4t4 * f4t7 * df4t8 * rinv_hb * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_hb_norm[0]*cost8 - bz[0]) * finc;
|
||||
delf[1] += (delr_hb_norm[1]*cost8 - bz[1]) * finc;
|
||||
|
||||
@ -28,43 +28,38 @@ namespace LAMMPS_NS {
|
||||
class PairOxdnaXstk : public Pair {
|
||||
public:
|
||||
PairOxdnaXstk(class LAMMPS *);
|
||||
virtual ~PairOxdnaXstk();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_list(int, class NeighList *);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
void *extract(const char *, int &);
|
||||
~PairOxdnaXstk() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_list(int, class NeighList *) override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
protected:
|
||||
// cross-stacking interaction
|
||||
double **k_xst, **cut_xst_0, **cut_xst_c, **cut_xst_lo, **cut_xst_hi;
|
||||
double **cut_xst_lc, **cut_xst_hc, **b_xst_lo, **b_xst_hi;
|
||||
double **cutsq_xst_hc;
|
||||
|
||||
double **a_xst1, **theta_xst1_0, **dtheta_xst1_ast;
|
||||
double **b_xst1, **dtheta_xst1_c;
|
||||
|
||||
double **a_xst2, **theta_xst2_0, **dtheta_xst2_ast;
|
||||
double **b_xst2, **dtheta_xst2_c;
|
||||
|
||||
double **a_xst3, **theta_xst3_0, **dtheta_xst3_ast;
|
||||
double **b_xst3, **dtheta_xst3_c;
|
||||
|
||||
double **a_xst4, **theta_xst4_0, **dtheta_xst4_ast;
|
||||
double **b_xst4, **dtheta_xst4_c;
|
||||
|
||||
double **a_xst7, **theta_xst7_0, **dtheta_xst7_ast;
|
||||
double **b_xst7, **dtheta_xst7_c;
|
||||
|
||||
double **a_xst8, **theta_xst8_0, **dtheta_xst8_ast;
|
||||
double **b_xst8, **dtheta_xst8_c;
|
||||
double **nx_xtrct, **ny_xtrct, **nz_xtrct; // per-atom arrays for local unit vectors
|
||||
|
||||
virtual void allocate();
|
||||
};
|
||||
|
||||
@ -27,8 +27,8 @@ namespace LAMMPS_NS {
|
||||
class PairOxrna2Dh : public PairOxdna2Dh {
|
||||
public:
|
||||
PairOxrna2Dh(class LAMMPS *lmp) : PairOxdna2Dh(lmp) {}
|
||||
virtual ~PairOxrna2Dh() {}
|
||||
virtual void compute_interaction_sites(double *, double *, double *, double *);
|
||||
|
||||
void compute_interaction_sites(double *, double *, double *, double *) override;
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -27,8 +27,8 @@ namespace LAMMPS_NS {
|
||||
class PairOxrna2Excv : public PairOxdnaExcv {
|
||||
public:
|
||||
PairOxrna2Excv(class LAMMPS *lmp) : PairOxdnaExcv(lmp) {}
|
||||
virtual ~PairOxrna2Excv() {}
|
||||
virtual void compute_interaction_sites(double *, double *, double *, double *, double *);
|
||||
|
||||
void compute_interaction_sites(double *, double *, double *, double *, double *) override;
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -27,7 +27,6 @@ namespace LAMMPS_NS {
|
||||
class PairOxrna2Hbond : public PairOxdnaHbond {
|
||||
public:
|
||||
PairOxrna2Hbond(class LAMMPS *);
|
||||
virtual ~PairOxrna2Hbond() {}
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
#include "pair_oxrna2_stk.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "atom_vec_ellipsoid.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
@ -222,7 +221,7 @@ void PairOxrna2Stk::compute(int eflag, int vflag)
|
||||
{
|
||||
|
||||
double delf[3],delta[3],deltb[3]; // force, torque increment;
|
||||
double evdwl,fpair,finc,tpair;
|
||||
double evdwl,finc,tpair;
|
||||
double delr_ss[3],delr_ss_norm[3],rsq_ss,r_ss,rinv_ss;
|
||||
double delr_st[3],delr_st_norm[3],rsq_st,r_st,rinv_st;
|
||||
double theta5p,t5pdir[3],cost5p;
|
||||
@ -245,9 +244,9 @@ void PairOxrna2Stk::compute(int eflag, int vflag)
|
||||
double ra_cs[3],ra_cst[3];
|
||||
double rb_cs[3],rb_cst[3];
|
||||
|
||||
// quaternions and Cartesian unit vectors in lab frame
|
||||
double *qa,ax[3],ay[3],az[3];
|
||||
double *qb,bx[3],by[3],bz[3];
|
||||
// Cartesian unit vectors in lab frame
|
||||
double ax[3],ay[3],az[3];
|
||||
double bx[3],by[3],bz[3];
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
@ -262,10 +261,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag)
|
||||
|
||||
tagint *id5p = atom->id5p;
|
||||
|
||||
AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
|
||||
AtomVecEllipsoid::Bonus *bonus = avec->bonus;
|
||||
int *ellipsoid = atom->ellipsoid;
|
||||
|
||||
int a,b,btemp,in,atype,btype;
|
||||
|
||||
double f1,f4t5,f4t6,f4t9,f4t10,f5c1,f5c2;
|
||||
@ -274,6 +269,12 @@ void PairOxrna2Stk::compute(int eflag, int vflag)
|
||||
evdwl = 0.0;
|
||||
ev_init(eflag,vflag);
|
||||
|
||||
// n(x/y/z)_xtrct = extracted local unit vectors from oxdna_excv
|
||||
int dim;
|
||||
nx_xtrct = (double **) force->pair->extract("nx",dim);
|
||||
ny_xtrct = (double **) force->pair->extract("ny",dim);
|
||||
nz_xtrct = (double **) force->pair->extract("nz",dim);
|
||||
|
||||
// loop over stacking interaction neighbors using bond topology
|
||||
|
||||
for (in = 0; in < nbondlist; in++) {
|
||||
@ -290,12 +291,26 @@ void PairOxrna2Stk::compute(int eflag, int vflag)
|
||||
|
||||
}
|
||||
|
||||
// a now in 3' direction, b in 5' direction
|
||||
// a now in 3' direction, b in 5' direction
|
||||
|
||||
qa=bonus[ellipsoid[a]].quat;
|
||||
MathExtra::q_to_exyz(qa,ax,ay,az);
|
||||
qb=bonus[ellipsoid[b]].quat;
|
||||
MathExtra::q_to_exyz(qb,bx,by,bz);
|
||||
ax[0] = nx_xtrct[a][0];
|
||||
ax[1] = nx_xtrct[a][1];
|
||||
ax[2] = nx_xtrct[a][2];
|
||||
ay[0] = ny_xtrct[a][0];
|
||||
ay[1] = ny_xtrct[a][1];
|
||||
ay[2] = ny_xtrct[a][2];
|
||||
az[0] = nz_xtrct[a][0];
|
||||
az[1] = nz_xtrct[a][1];
|
||||
az[2] = nz_xtrct[a][2];
|
||||
bx[0] = nx_xtrct[b][0];
|
||||
bx[1] = nx_xtrct[b][1];
|
||||
bx[2] = nx_xtrct[b][2];
|
||||
by[0] = ny_xtrct[b][0];
|
||||
by[1] = ny_xtrct[b][1];
|
||||
by[2] = ny_xtrct[b][2];
|
||||
bz[0] = nz_xtrct[b][0];
|
||||
bz[1] = nz_xtrct[b][1];
|
||||
bz[2] = nz_xtrct[b][2];
|
||||
|
||||
// vector COM a - 5'-stacking site a
|
||||
ra_cst[0] = d_cst_x_5p*ax[0] + d_cst_y_5p*ay[0];
|
||||
@ -442,8 +457,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag)
|
||||
|
||||
// force, torque and virial contribution for forces between stacking sites
|
||||
|
||||
fpair = 0.0;
|
||||
|
||||
delf[0] = 0.0;
|
||||
delf[1] = 0.0;
|
||||
delf[2] = 0.0;
|
||||
@ -458,7 +471,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag)
|
||||
|
||||
// radial force
|
||||
finc = -df1 * f4t5 * f4t6 * f4t9 * f4t10 * f5c1 * f5c2;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += delr_st[0] * finc;
|
||||
delf[1] += delr_st[1] * finc;
|
||||
@ -468,7 +480,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag)
|
||||
if (theta5p) {
|
||||
|
||||
finc = -f1 * df4t5 * f4t6 * f4t9 * f4t10 * f5c1 * f5c2 * rinv_st;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_st_norm[0]*cost5p - bz[0]) * finc;
|
||||
delf[1] += (delr_st_norm[1]*cost5p - bz[1]) * finc;
|
||||
@ -480,7 +491,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag)
|
||||
if (theta6p) {
|
||||
|
||||
finc = -f1 * f4t5 * df4t6 * f4t9 * f4t10 * f5c1 * f5c2 * rinv_st;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_st_norm[0]*cost6p - az[0]) * finc;
|
||||
delf[1] += (delr_st_norm[1]*cost6p - az[1]) * finc;
|
||||
@ -532,8 +542,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag)
|
||||
|
||||
// force, torque and virial contribution for forces between backbone sites
|
||||
|
||||
fpair = 0.0;
|
||||
|
||||
delf[0] = 0.0;
|
||||
delf[1] = 0.0;
|
||||
delf[2] = 0.0;
|
||||
@ -550,7 +558,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag)
|
||||
if (theta9) {
|
||||
|
||||
finc = -f1 * f4t5 * f4t6 * df4t9 * f4t10 * f5c1 * f5c2 * rinv_ss;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_ss_norm[0]*cost9 - aux3p[0]) * finc;
|
||||
delf[1] += (delr_ss_norm[1]*cost9 - aux3p[1]) * finc;
|
||||
@ -562,7 +569,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag)
|
||||
if (theta10) {
|
||||
|
||||
finc = -f1 * f4t5 * f4t6 * f4t9 * df4t10 * f5c1 * f5c2 * rinv_ss;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_ss_norm[0]*cost10 - aux5p[0]) * finc;
|
||||
delf[1] += (delr_ss_norm[1]*cost10 - aux5p[1]) * finc;
|
||||
@ -574,7 +580,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag)
|
||||
if (cosphi1) {
|
||||
|
||||
finc = -f1 * f4t5 * f4t6 * f4t9 * f4t10 * df5c1 * f5c2 * rinv_ss;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_ss_norm[0]*cosphi1 - by[0]) * finc;
|
||||
delf[1] += (delr_ss_norm[1]*cosphi1 - by[1]) * finc;
|
||||
@ -586,7 +591,6 @@ void PairOxrna2Stk::compute(int eflag, int vflag)
|
||||
if (cosphi2) {
|
||||
|
||||
finc = -f1 * f4t5 * f4t6 * f4t9 * f4t10 * f5c1 * df5c2 * rinv_ss;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_ss_norm[0]*cosphi2 - ay[0]) * finc;
|
||||
delf[1] += (delr_ss_norm[1]*cosphi2 - ay[1]) * finc;
|
||||
|
||||
@ -27,20 +27,20 @@ namespace LAMMPS_NS {
|
||||
class PairOxrna2Stk : public Pair {
|
||||
public:
|
||||
PairOxrna2Stk(class LAMMPS *);
|
||||
virtual ~PairOxrna2Stk();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_style();
|
||||
void init_list(int, class NeighList *);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
void *extract(const char *, int &);
|
||||
~PairOxrna2Stk() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
void init_list(int, class NeighList *) override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
protected:
|
||||
// stacking interaction
|
||||
@ -60,7 +60,7 @@ class PairOxrna2Stk : public Pair {
|
||||
double **b_st10, **dtheta_st10_c;
|
||||
double **a_st1, **cosphi_st1_ast, **b_st1, **cosphi_st1_c;
|
||||
double **a_st2, **cosphi_st2_ast, **b_st2, **cosphi_st2_c;
|
||||
|
||||
double **nx_xtrct, **ny_xtrct, **nz_xtrct; // per-atom arrays for local unit vectors
|
||||
int seqdepflag;
|
||||
|
||||
virtual void allocate();
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
#include "pair_oxrna2_xstk.h"
|
||||
|
||||
#include "atom.h"
|
||||
#include "atom_vec_ellipsoid.h"
|
||||
#include "comm.h"
|
||||
#include "error.h"
|
||||
#include "force.h"
|
||||
@ -107,7 +106,7 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
|
||||
{
|
||||
|
||||
double delf[3],delta[3],deltb[3]; // force, torque increment;
|
||||
double evdwl,fpair,finc,tpair,factor_lj;
|
||||
double evdwl,finc,tpair,factor_lj;
|
||||
double delr_hb[3],delr_hb_norm[3],rsq_hb,r_hb,rinv_hb;
|
||||
double theta1,t1dir[3],cost1;
|
||||
double theta2,t2dir[3],cost2;
|
||||
@ -120,9 +119,9 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
|
||||
// vectors COM-h-bonding site in lab frame
|
||||
double ra_chb[3],rb_chb[3];
|
||||
|
||||
// quaternions and Cartesian unit vectors in lab frame
|
||||
double *qa,ax[3],ay[3],az[3];
|
||||
double *qb,bx[3],by[3],bz[3];
|
||||
// Cartesian unit vectors in lab frame
|
||||
double ax[3],az[3];
|
||||
double bx[3],bz[3];
|
||||
|
||||
double **x = atom->x;
|
||||
double **f = atom->f;
|
||||
@ -134,10 +133,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
|
||||
int *alist,*blist,*numneigh,**firstneigh;
|
||||
double *special_lj = force->special_lj;
|
||||
|
||||
AtomVecEllipsoid *avec = (AtomVecEllipsoid *) atom->style_match("ellipsoid");
|
||||
AtomVecEllipsoid::Bonus *bonus = avec->bonus;
|
||||
int *ellipsoid = atom->ellipsoid;
|
||||
|
||||
int a,b,ia,ib,anum,bnum,atype,btype;
|
||||
|
||||
double f2,f4t1,f4t2,f4t3,f4t7,f4t8;
|
||||
@ -151,6 +146,11 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
|
||||
numneigh = list->numneigh;
|
||||
firstneigh = list->firstneigh;
|
||||
|
||||
// n(x/z)_xtrct = extracted local unit vectors from oxdna_excv
|
||||
int dim;
|
||||
nx_xtrct = (double **) force->pair->extract("nx",dim);
|
||||
nz_xtrct = (double **) force->pair->extract("nz",dim);
|
||||
|
||||
// loop over pair interaction neighbors of my atoms
|
||||
|
||||
for (ia = 0; ia < anum; ia++) {
|
||||
@ -158,8 +158,9 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
|
||||
a = alist[ia];
|
||||
atype = type[a];
|
||||
|
||||
qa=bonus[ellipsoid[a]].quat;
|
||||
MathExtra::q_to_exyz(qa,ax,ay,az);
|
||||
ax[0] = nx_xtrct[a][0];
|
||||
ax[1] = nx_xtrct[a][1];
|
||||
ax[2] = nx_xtrct[a][2];
|
||||
|
||||
ra_chb[0] = d_chb*ax[0];
|
||||
ra_chb[1] = d_chb*ax[1];
|
||||
@ -176,8 +177,9 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
|
||||
|
||||
btype = type[b];
|
||||
|
||||
qb=bonus[ellipsoid[b]].quat;
|
||||
MathExtra::q_to_exyz(qb,bx,by,bz);
|
||||
bx[0] = nx_xtrct[b][0];
|
||||
bx[1] = nx_xtrct[b][1];
|
||||
bx[2] = nx_xtrct[b][2];
|
||||
|
||||
rb_chb[0] = d_chb*bx[0];
|
||||
rb_chb[1] = d_chb*bx[1];
|
||||
@ -236,6 +238,10 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
|
||||
// early rejection criterium
|
||||
if (f4t3) {
|
||||
|
||||
az[0] = nz_xtrct[a][0];
|
||||
az[1] = nz_xtrct[a][1];
|
||||
az[2] = nz_xtrct[a][2];
|
||||
|
||||
cost7 = -1.0*MathExtra::dot3(az,delr_hb_norm);
|
||||
if (cost7 > 1.0) cost7 = 1.0;
|
||||
if (cost7 < -1.0) cost7 = -1.0;
|
||||
@ -250,6 +256,10 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
|
||||
// early rejection criterium
|
||||
if (f4t7) {
|
||||
|
||||
bz[0] = nz_xtrct[b][0];
|
||||
bz[1] = nz_xtrct[b][1];
|
||||
bz[2] = nz_xtrct[b][2];
|
||||
|
||||
cost8 = MathExtra::dot3(bz,delr_hb_norm);
|
||||
if (cost8 > 1.0) cost8 = 1.0;
|
||||
if (cost8 < -1.0) cost8 = -1.0;
|
||||
@ -295,8 +305,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
|
||||
|
||||
// force, torque and virial contribution for forces between h-bonding sites
|
||||
|
||||
fpair = 0.0;
|
||||
|
||||
delf[0] = 0.0;
|
||||
delf[1] = 0.0;
|
||||
delf[2] = 0.0;
|
||||
@ -311,7 +319,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
|
||||
|
||||
// radial force
|
||||
finc = -df2 * f4t1 * f4t2 * f4t3 * f4t7 * f4t8 * rinv_hb *factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += delr_hb[0] * finc;
|
||||
delf[1] += delr_hb[1] * finc;
|
||||
@ -321,7 +328,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
|
||||
if (theta2) {
|
||||
|
||||
finc = -f2 * f4t1 * df4t2 * f4t3 * f4t7 * f4t8 * rinv_hb * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_hb_norm[0]*cost2 + ax[0]) * finc;
|
||||
delf[1] += (delr_hb_norm[1]*cost2 + ax[1]) * finc;
|
||||
@ -333,7 +339,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
|
||||
if (theta3) {
|
||||
|
||||
finc = -f2 * f4t1 * f4t2 * df4t3 * f4t7 * f4t8 * rinv_hb * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_hb_norm[0]*cost3 - bx[0]) * finc;
|
||||
delf[1] += (delr_hb_norm[1]*cost3 - bx[1]) * finc;
|
||||
@ -345,7 +350,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
|
||||
if (theta7) {
|
||||
|
||||
finc = -f2 * f4t1 * f4t2 * f4t3 * df4t7 * f4t8 * rinv_hb * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_hb_norm[0]*cost7 + az[0]) * finc;
|
||||
delf[1] += (delr_hb_norm[1]*cost7 + az[1]) * finc;
|
||||
@ -357,7 +361,6 @@ void PairOxrna2Xstk::compute(int eflag, int vflag)
|
||||
if (theta8) {
|
||||
|
||||
finc = -f2 * f4t1 * f4t2 * f4t3 * f4t7 * df4t8 * rinv_hb * factor_lj;
|
||||
fpair += finc;
|
||||
|
||||
delf[0] += (delr_hb_norm[0]*cost8 - bz[0]) * finc;
|
||||
delf[1] += (delr_hb_norm[1]*cost8 - bz[1]) * finc;
|
||||
|
||||
@ -27,40 +27,36 @@ namespace LAMMPS_NS {
|
||||
class PairOxrna2Xstk : public Pair {
|
||||
public:
|
||||
PairOxrna2Xstk(class LAMMPS *);
|
||||
virtual ~PairOxrna2Xstk();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_list(int, class NeighList *);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
void *extract(const char *, int &);
|
||||
~PairOxrna2Xstk() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_list(int, class NeighList *) override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
protected:
|
||||
// cross-stacking interaction
|
||||
double **k_xst, **cut_xst_0, **cut_xst_c, **cut_xst_lo, **cut_xst_hi;
|
||||
double **cut_xst_lc, **cut_xst_hc, **b_xst_lo, **b_xst_hi;
|
||||
double **cutsq_xst_hc;
|
||||
|
||||
double **a_xst1, **theta_xst1_0, **dtheta_xst1_ast;
|
||||
double **b_xst1, **dtheta_xst1_c;
|
||||
|
||||
double **a_xst2, **theta_xst2_0, **dtheta_xst2_ast;
|
||||
double **b_xst2, **dtheta_xst2_c;
|
||||
|
||||
double **a_xst3, **theta_xst3_0, **dtheta_xst3_ast;
|
||||
double **b_xst3, **dtheta_xst3_c;
|
||||
|
||||
double **a_xst7, **theta_xst7_0, **dtheta_xst7_ast;
|
||||
double **b_xst7, **dtheta_xst7_c;
|
||||
|
||||
double **a_xst8, **theta_xst8_0, **dtheta_xst8_ast;
|
||||
double **b_xst8, **dtheta_xst8_c;
|
||||
double **nx_xtrct, **nz_xtrct; // per-atom arrays for local unit vectors
|
||||
|
||||
virtual void allocate();
|
||||
};
|
||||
|
||||
@ -27,15 +27,15 @@ namespace LAMMPS_NS {
|
||||
class AngleSDK : public Angle {
|
||||
public:
|
||||
AngleSDK(class LAMMPS *);
|
||||
virtual ~AngleSDK();
|
||||
virtual void compute(int, int);
|
||||
void coeff(int, char **);
|
||||
void init_style();
|
||||
double equilibrium_angle(int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, int, int, int);
|
||||
~AngleSDK() override;
|
||||
void compute(int, int) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double equilibrium_angle(int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
double single(int, int, int, int) override;
|
||||
|
||||
protected:
|
||||
double *k, *theta0;
|
||||
|
||||
@ -31,20 +31,20 @@ namespace LAMMPS_NS {
|
||||
class PairLJSDK : public Pair {
|
||||
public:
|
||||
PairLJSDK(LAMMPS *);
|
||||
virtual ~PairLJSDK();
|
||||
virtual void compute(int, int);
|
||||
virtual void settings(int, char **);
|
||||
virtual void coeff(int, char **);
|
||||
virtual double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
void *extract(const char *, int &);
|
||||
virtual double memory_usage();
|
||||
~PairLJSDK() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
double single(int, int, int, int, double, double, double, double &) override;
|
||||
void *extract(const char *, int &) override;
|
||||
double memory_usage() override;
|
||||
|
||||
protected:
|
||||
int **lj_type; // type of lennard jones potential
|
||||
|
||||
@ -31,21 +31,21 @@ namespace LAMMPS_NS {
|
||||
class PairLJSDKCoulLong : public Pair {
|
||||
public:
|
||||
PairLJSDKCoulLong(class LAMMPS *);
|
||||
virtual ~PairLJSDKCoulLong();
|
||||
virtual void compute(int, int);
|
||||
virtual void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_style();
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
virtual void write_restart_settings(FILE *);
|
||||
virtual void read_restart_settings(FILE *);
|
||||
virtual double single(int, int, int, int, double, double, double, double &);
|
||||
virtual void *extract(const char *, int &);
|
||||
virtual double memory_usage();
|
||||
~PairLJSDKCoulLong() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
double single(int, int, int, int, double, double, double, double &) override;
|
||||
void *extract(const char *, int &) override;
|
||||
double memory_usage() override;
|
||||
|
||||
protected:
|
||||
double **cut_lj, **cut_ljsq;
|
||||
|
||||
@ -31,10 +31,9 @@ namespace LAMMPS_NS {
|
||||
class PairLJSDKCoulMSM : public PairLJSDKCoulLong {
|
||||
public:
|
||||
PairLJSDKCoulMSM(class LAMMPS *);
|
||||
virtual ~PairLJSDKCoulMSM(){};
|
||||
virtual void compute(int, int);
|
||||
virtual double single(int, int, int, int, double, double, double, double &);
|
||||
virtual void *extract(const char *, int &);
|
||||
void compute(int, int) override;
|
||||
double single(int, int, int, int, double, double, double, double &) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
private:
|
||||
template <int EVFLAG, int EFLAG, int NEWTON_PAIR> void eval_msm();
|
||||
|
||||
@ -27,14 +27,14 @@ namespace LAMMPS_NS {
|
||||
class AngleClass2 : public Angle {
|
||||
public:
|
||||
AngleClass2(class LAMMPS *);
|
||||
virtual ~AngleClass2();
|
||||
virtual void compute(int, int);
|
||||
virtual void coeff(int, char **);
|
||||
double equilibrium_angle(int);
|
||||
virtual void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, int, int, int);
|
||||
~AngleClass2() override;
|
||||
void compute(int, int) override;
|
||||
void coeff(int, char **) override;
|
||||
double equilibrium_angle(int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
double single(int, int, int, int) override;
|
||||
|
||||
protected:
|
||||
double *theta0, *k2, *k3, *k4;
|
||||
|
||||
@ -27,15 +27,15 @@ namespace LAMMPS_NS {
|
||||
class BondClass2 : public Bond {
|
||||
public:
|
||||
BondClass2(class LAMMPS *);
|
||||
virtual ~BondClass2();
|
||||
virtual void compute(int, int);
|
||||
virtual void coeff(int, char **);
|
||||
double equilibrium_distance(int);
|
||||
void write_restart(FILE *);
|
||||
virtual void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
double single(int, double, int, int, double &);
|
||||
virtual void *extract(const char *, int &);
|
||||
~BondClass2() override;
|
||||
void compute(int, int) override;
|
||||
void coeff(int, char **) override;
|
||||
double equilibrium_distance(int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
double single(int, double, int, int, double &) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
protected:
|
||||
double *r0, *k2, *k3, *k4;
|
||||
|
||||
@ -27,12 +27,12 @@ namespace LAMMPS_NS {
|
||||
class DihedralClass2 : public Dihedral {
|
||||
public:
|
||||
DihedralClass2(class LAMMPS *);
|
||||
virtual ~DihedralClass2();
|
||||
virtual void compute(int, int);
|
||||
virtual void coeff(int, char **);
|
||||
void write_restart(FILE *);
|
||||
virtual void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
~DihedralClass2() override;
|
||||
void compute(int, int) override;
|
||||
void coeff(int, char **) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
|
||||
protected:
|
||||
double *k1, *k2, *k3;
|
||||
|
||||
@ -27,12 +27,12 @@ namespace LAMMPS_NS {
|
||||
class ImproperClass2 : public Improper {
|
||||
public:
|
||||
ImproperClass2(class LAMMPS *);
|
||||
virtual ~ImproperClass2();
|
||||
virtual void compute(int, int);
|
||||
virtual void coeff(int, char **);
|
||||
void write_restart(FILE *);
|
||||
virtual void read_restart(FILE *);
|
||||
void write_data(FILE *);
|
||||
~ImproperClass2() override;
|
||||
void compute(int, int) override;
|
||||
void coeff(int, char **) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
|
||||
protected:
|
||||
double *k0, *chi0;
|
||||
|
||||
@ -25,24 +25,24 @@ namespace LAMMPS_NS {
|
||||
class PairLJClass2 : public Pair {
|
||||
public:
|
||||
PairLJClass2(class LAMMPS *);
|
||||
virtual ~PairLJClass2();
|
||||
virtual void compute(int, int);
|
||||
virtual void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
void init_style();
|
||||
virtual double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
void *extract(const char *, int &);
|
||||
~PairLJClass2() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
double single(int, int, int, int, double, double, double, double &) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
void compute_inner();
|
||||
void compute_middle();
|
||||
void compute_outer(int, int);
|
||||
void compute_inner() override;
|
||||
void compute_middle() override;
|
||||
void compute_outer(int, int) override;
|
||||
|
||||
protected:
|
||||
double cut_global;
|
||||
|
||||
@ -27,20 +27,20 @@ namespace LAMMPS_NS {
|
||||
class PairLJClass2CoulCut : public Pair {
|
||||
public:
|
||||
PairLJClass2CoulCut(class LAMMPS *);
|
||||
virtual ~PairLJClass2CoulCut();
|
||||
virtual void compute(int, int);
|
||||
virtual void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
virtual void init_style();
|
||||
virtual double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
void *extract(const char *, int &);
|
||||
~PairLJClass2CoulCut() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
double single(int, int, int, int, double, double, double, double &) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
protected:
|
||||
double cut_lj_global, cut_coul_global;
|
||||
|
||||
@ -27,24 +27,24 @@ namespace LAMMPS_NS {
|
||||
class PairLJClass2CoulLong : public Pair {
|
||||
public:
|
||||
PairLJClass2CoulLong(class LAMMPS *);
|
||||
virtual ~PairLJClass2CoulLong();
|
||||
virtual void compute(int, int);
|
||||
virtual void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
virtual void init_style();
|
||||
virtual double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
~PairLJClass2CoulLong() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
void init_style() override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
double single(int, int, int, int, double, double, double, double &) override;
|
||||
|
||||
void compute_inner();
|
||||
void compute_middle();
|
||||
void compute_outer(int, int);
|
||||
void *extract(const char *, int &);
|
||||
void compute_inner() override;
|
||||
void compute_middle() override;
|
||||
void compute_outer(int, int) override;
|
||||
void *extract(const char *, int &) override;
|
||||
|
||||
protected:
|
||||
double cut_lj_global;
|
||||
|
||||
@ -27,9 +27,9 @@ namespace LAMMPS_NS {
|
||||
class FixWallColloid : public FixWall {
|
||||
public:
|
||||
FixWallColloid(class LAMMPS *, int, char **);
|
||||
void init();
|
||||
void precompute(int);
|
||||
void wall_particle(int, int, double);
|
||||
void init() override;
|
||||
void precompute(int) override;
|
||||
void wall_particle(int, int, double) override;
|
||||
|
||||
private:
|
||||
double coeff1[6], coeff2[6], coeff3[6], coeff4[6];
|
||||
|
||||
@ -27,16 +27,16 @@ namespace LAMMPS_NS {
|
||||
class PairBrownian : public Pair {
|
||||
public:
|
||||
PairBrownian(class LAMMPS *);
|
||||
virtual ~PairBrownian();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
virtual double init_one(int, int);
|
||||
virtual void init_style();
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
~PairBrownian() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
double init_one(int, int) override;
|
||||
void init_style() override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
|
||||
protected:
|
||||
double cut_inner_global, cut_global;
|
||||
|
||||
@ -27,10 +27,10 @@ namespace LAMMPS_NS {
|
||||
class PairBrownianPoly : public PairBrownian {
|
||||
public:
|
||||
PairBrownianPoly(class LAMMPS *);
|
||||
~PairBrownianPoly() {}
|
||||
void compute(int, int);
|
||||
double init_one(int, int);
|
||||
void init_style();
|
||||
|
||||
void compute(int, int) override;
|
||||
double init_one(int, int) override;
|
||||
void init_style() override;
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
@ -27,18 +27,18 @@ namespace LAMMPS_NS {
|
||||
class PairColloid : public Pair {
|
||||
public:
|
||||
PairColloid(class LAMMPS *);
|
||||
virtual ~PairColloid();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
double init_one(int, int);
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
void write_data(FILE *);
|
||||
void write_data_all(FILE *);
|
||||
double single(int, int, int, int, double, double, double, double &);
|
||||
~PairColloid() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
double init_one(int, int) override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
void write_data(FILE *) override;
|
||||
void write_data_all(FILE *) override;
|
||||
double single(int, int, int, int, double, double, double, double &) override;
|
||||
|
||||
protected:
|
||||
enum { SMALL_SMALL, SMALL_LARGE, LARGE_LARGE };
|
||||
|
||||
@ -27,21 +27,21 @@ namespace LAMMPS_NS {
|
||||
class PairLubricate : public Pair {
|
||||
public:
|
||||
PairLubricate(class LAMMPS *);
|
||||
virtual ~PairLubricate();
|
||||
virtual void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
double init_one(int, int);
|
||||
virtual void init_style();
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
~PairLubricate() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
double init_one(int, int) override;
|
||||
void init_style() override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
int pre_adapt(char *, int, int, int, int);
|
||||
void adapt(int, int, int, int, int, double);
|
||||
|
||||
int pack_forward_comm(int, int *, double *, int, int *);
|
||||
void unpack_forward_comm(int, int, double *);
|
||||
int pack_forward_comm(int, int *, double *, int, int *) override;
|
||||
void unpack_forward_comm(int, int, double *) override;
|
||||
|
||||
protected:
|
||||
double mu, cut_inner_global, cut_global;
|
||||
|
||||
@ -27,18 +27,18 @@ namespace LAMMPS_NS {
|
||||
class PairLubricateU : public Pair {
|
||||
public:
|
||||
PairLubricateU(class LAMMPS *);
|
||||
virtual ~PairLubricateU();
|
||||
virtual void compute(int, int);
|
||||
virtual void settings(int, char **);
|
||||
void coeff(int, char **);
|
||||
double init_one(int, int);
|
||||
virtual void init_style();
|
||||
void write_restart(FILE *);
|
||||
void read_restart(FILE *);
|
||||
void write_restart_settings(FILE *);
|
||||
void read_restart_settings(FILE *);
|
||||
int pack_forward_comm(int, int *, double *, int, int *);
|
||||
void unpack_forward_comm(int, int, double *);
|
||||
~PairLubricateU() override;
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void coeff(int, char **) override;
|
||||
double init_one(int, int) override;
|
||||
void init_style() override;
|
||||
void write_restart(FILE *) override;
|
||||
void read_restart(FILE *) override;
|
||||
void write_restart_settings(FILE *) override;
|
||||
void read_restart_settings(FILE *) override;
|
||||
int pack_forward_comm(int, int *, double *, int, int *) override;
|
||||
void unpack_forward_comm(int, int, double *) override;
|
||||
|
||||
protected:
|
||||
double cut_inner_global, cut_global;
|
||||
|
||||
@ -27,10 +27,10 @@ namespace LAMMPS_NS {
|
||||
class PairLubricateUPoly : public PairLubricateU {
|
||||
public:
|
||||
PairLubricateUPoly(class LAMMPS *);
|
||||
~PairLubricateUPoly() {}
|
||||
void compute(int, int);
|
||||
void settings(int, char **);
|
||||
void init_style();
|
||||
|
||||
void compute(int, int) override;
|
||||
void settings(int, char **) override;
|
||||
void init_style() override;
|
||||
|
||||
private:
|
||||
double vol_P;
|
||||
@ -38,9 +38,9 @@ class PairLubricateUPoly : public PairLubricateU {
|
||||
class FixWall *wallfix;
|
||||
|
||||
void iterate(double **, int);
|
||||
void compute_RE(double **);
|
||||
void compute_RU(double **);
|
||||
void compute_Fh(double **);
|
||||
void compute_RE(double **) override;
|
||||
void compute_RU(double **) override;
|
||||
void compute_Fh(double **) override;
|
||||
};
|
||||
|
||||
} // namespace LAMMPS_NS
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user