/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef PAIR_H #define PAIR_H #include "pointers.h" namespace LAMMPS_NS { class Pair : protected Pointers { public: double eng_vdwl,eng_coul; // accumulated energies double virial[6]; // accumulated virial double cutforce; // max cutoff for all atom pairs double **cutsq; // max cutoff sq for each atom pair int **setflag; // 0/1 = whether each i,j has been set int comm_forward; // size of forward communication (0 if none) int comm_reverse; // size of reverse communication (0 if none) int neigh_half_every; // 0/1 = if needs half neighbor list int neigh_full_every; // 0/1 = if needs full neighbor list int single_enable; // 1 if single() routine exists int respa_enable; // 1 if inner/middle/outer rRESPA routines int one_coeff; // 1 if allows only one coeff * * call int tail_flag; // pair_modify flag for LJ tail correction double etail,ptail; // energy/pressure tail corrections double etail_ij,ptail_ij; struct One { // single interaction between 2 atoms double fforce; double eng_vdwl,eng_coul; double fx,fy,fz; double tix,tiy,tiz,tjx,tjy,tjz; }; // begin Philip's changes struct Param { // parameter set for an I-J-K interaction in SW double epsilon,sigma; double littlea,lambda,gamma,costheta; double biga,bigb; double powerp,powerq; double cut,cutsq; double sigma_gamma,lambda_epsilon,lambda_epsilon2; double c1,c2,c3,c4,c5,c6; int ielement,jelement,kelement; }; // end Philip's changes Pair(class LAMMPS *); virtual ~Pair() {} // top-level Pair methods void init(); double mix_energy(double, double, double, double); double mix_distance(double, double); void virial_compute(); void write_file(int, char **); void init_bitmap(double, double, int, int &, int &, int &, int &); virtual void modify_params(int, char **); // general child-class methods virtual void compute(int, int) = 0; virtual void settings(int, char **) = 0; virtual void coeff(int, char **) = 0; virtual double init_one(int, int) {return 0.0;} virtual void init_style() {} virtual void compute_inner() {} virtual void compute_middle() {} virtual void compute_outer(int, int) {} virtual void single(int, int, int, int, double, double, double, int, One &) {} // begin Philip's changes (copied from pair_sw.h) Param *params; char **elements; // names of unique elements int ***elem2param; // mapping from element triplets to parameters int *map; // mapping from atom types to elements virtual void twobody(Param *, double, double &, int, double &) {} virtual void threebody(Param *, double, double, double *, double *, double *, double *, int, double &) {} // end Philip's changes virtual void write_restart(FILE *) {} virtual void read_restart(FILE *) {} virtual void write_restart_settings(FILE *) {} virtual void read_restart_settings(FILE *) {} virtual int pack_comm(int, int *, double *, int, int *) {return 0;} virtual void unpack_comm(int, int, double *) {} virtual int pack_reverse_comm(int, int, double *) {return 0;} virtual void unpack_reverse_comm(int, int *, double *) {} virtual int memory_usage() {return 0;} // specific child-class methods for certain Pair styles virtual void single_embed(int, int, double &) {} virtual void extract_charmm(double ***, double ***, double ***, double ***, int *) {} virtual void extract_dipole(double ***) {} virtual void extract_eam(double *, double **) {} virtual void extract_gran(double *, double *, double *, int *) {} virtual void extract_long(double *) {} virtual void extract_tip4p(double *, int *, int *, int *, int *) {} protected: int allocated; // 0/1 = whether arrays are allocated // pair_modify settings int offset_flag,mix_flag; // flags for offset and mixing int ncoultablebits; // size of Coulomb table double tabinner; // inner cutoff for Coulomb table }; } #endif