/* * force.h * * Define 'Force' struct and function prototypes. */ #ifndef FORCE_H #define FORCE_H #include "data.h" #if 0 #include "mg.h" #include "mgrid.h" #include "dpmta.h" #endif #ifdef __cplusplus extern "C" { #endif /* * forward declaration */ struct AtomBox_Tag; /* * force computation object */ typedef struct Force_Tag { /* pointer back to main simulation data */ Data *data; /* nonbonded forces */ /* * pointer to routine to compute nonbonded forces */ MD_Errcode (*compute_nonbonded)(struct Force_Tag *); /* * table for van der Waals force constants * * there are (4 * natomprms^2) entries in table that store * A, B, A_14, B_14 for each pairwise interaction type * * for an interaction between atoms itype and jtype, * table entry is: 4 * (itype * natomprms + jtype) * * the table is built during deven_force_init */ double *vdwtable; /* * exclusion list for nonbonded interactions * * this is a jagged matrix with natoms rows, each row contains a * sorted list of atom numbers j for which atom numbered i has a * nonbonded exclusion; each row ends with sentinel INT_MAX * * list is built during deven_force_init based on the established * exclusion policy with up to 1-4 exclusions depending on simparam * setting (if scaled 1-4 interactions are in effect, then list * contains only 1-2 and 1-3 exclusions) */ MD_Int **excllist; /* * scaled 1-4 exclusion list * * same as above except that this list contains only 1-4 exclusions */ MD_Int **scaled14; /* * nonbonded force constants */ double elec_const; double cutoff2; double inv_cutoff2; double switchdist2; double sw_denom; double sw_denom_times_four; MD_Int is_switching; /* * cutoff force evaluation */ struct AtomBox_Tag *atombox; MD_Int numbox; MD_Int nxbox, nybox, nzbox; double xmin, ymin, zmin; double inv_xboxsize, inv_yboxsize, inv_zboxsize; double xextent, yextent, zextent; /* * spherical boundary condition constants */ MD_Int is_sphericalbc; MD_Dvec center; double r1, k1, r2, k2; MD_Int p1, p2; #if 0 /* * parameters to MG routines */ Params mg_params; double **mg_f; double **mg_pos; double *mg_q; /* * parameters to mgrid routines */ Mgrid *mgrid; MgridParams mgrid_params; MgridSystem mgrid_system; double *mgrid_q; /* * parameters to DPMTA routines */ PmtaInitData pmta_init_data; PmtaParticle *pmta_particle; PmtaPartInfo *pmta_result; #endif /* * nonbonded potentials */ double pe_elec; double pe_vdw; } Force; /* * prototypes */ MD_Errcode deven_force_init(Force *force, Data *data); MD_Errcode deven_force_compute(Force *force); void deven_force_destroy(Force *force); #ifdef __cplusplus } #endif #endif /* FORCE_H */