00001
00002
00003
00004
00015 #ifndef FPARAM_H
00016 #define FPARAM_H
00017
00018 #include <float.h>
00019 #include "mdapi/mdtypes.h"
00020
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024
00064 typedef struct ForceParam_t {
00065
00066
00067 MD_AtomPrm *atomprm;
00068 MD_BondPrm *bondprm;
00069 MD_AnglePrm *angleprm;
00070 MD_TorsPrm *dihedprm;
00071 MD_TorsPrm *imprprm;
00072 MD_NbfixPrm *nbfixprm;
00074 int32 atomprm_len;
00075 int32 bondprm_len;
00076 int32 angleprm_len;
00077 int32 dihedprm_len;
00078 int32 imprprm_len;
00079 int32 nbfixprm_len;
00081
00082 MD_Atom *atom;
00083 MD_Bond *bond;
00084 MD_Angle *angle;
00085 MD_Tors *dihed;
00086 MD_Tors *impr;
00087 MD_Excl *excl;
00088 int32 atom_len;
00089 int32 bond_len;
00090 int32 angle_len;
00091 int32 dihed_len;
00092 int32 impr_len;
00093 int32 excl_len;
00095
00096 double cutoff;
00098 double elec_cutoff;
00099 double vdw_cutoff;
00100 double switchdist;
00102 double elec_const;
00105 double dielectric;
00106 double scaling14;
00110 double ewald_coef;
00112
00113 double radius1;
00115 double radius2;
00117 double length1;
00120 double length2;
00123 double konst1;
00124 double konst2;
00125 int32 exp1;
00127 int32 exp2;
00130
00131 int32 forcetypes;
00132 int32 exclpolicy;
00133 int32 elecopts;
00134 int32 vdwopts;
00135 int32 bresopts;
00138
00139 int32 shell_width;
00141 double cutoff_ratio;
00143 double delta_dis;
00146 double cell_margin;
00148 } ForceParam;
00149
00150
00155 enum ForceTypes_t {
00156 FORCE_NONE = 0x0000,
00161 FORCE_BOND = 0x0001,
00163 FORCE_ANGLE = 0x0002,
00165 FORCE_DIHED = 0x0004,
00167 FORCE_IMPR = 0x0008,
00169 FORCE_ELEC = 0x0010,
00171 FORCE_VDW = 0x0020,
00173 FORCE_BRES = 0x0040,
00175 FORCE_BONDED = FORCE_BOND | FORCE_ANGLE | FORCE_DIHED | FORCE_IMPR,
00177 FORCE_PAIRWISE = FORCE_ELEC | FORCE_VDW,
00179 FORCE_NONBONDED = FORCE_PAIRWISE | FORCE_BRES,
00181 FORCE_ALL = FORCE_BONDED | FORCE_NONBONDED
00184 };
00185
00186
00187
00188 enum ForceExcl_t {
00189 FORCE_EXCL_NONE = 0x001,
00194 FORCE_EXCL_12,
00196 FORCE_EXCL_13,
00199 FORCE_EXCL_14,
00202 FORCE_EXCL_SCAL14,
00207 FORCE_MARKER_EXCL
00210 };
00211
00212
00213
00214 enum ForceElec_t {
00215
00216
00217 FORCE_ELEC_DIRECT = 0x001,
00220 FORCE_ELEC_GRIDCELLS = 0x002,
00222 FORCE_ELEC_PAIRLISTS = 0x004,
00224 FORCE_ELEC_STNDEXCL = 0x008,
00231
00232 FORCE_ELEC_STANDARD = 0x010,
00234 FORCE_ELEC_SHIFTED = 0x020,
00237 FORCE_ELEC_EWALD = 0x040,
00240 FORCE_ELEC_GLASS = 0x080,
00241
00242
00243 FORCE_MASK_ELEC_METHOD = 0x00f,
00245 FORCE_MASK_ELEC_POTENTIAL = 0x0f0,
00248
00249 FORCE_ELECOPTS_DIRECT = FORCE_ELEC_DIRECT | FORCE_ELEC_STANDARD,
00251 FORCE_ELECOPTS_CUTOFF = FORCE_ELEC_GRIDCELLS | FORCE_ELEC_SHIFTED,
00253 FORCE_ELECOPTS_LONGRNG = FORCE_ELEC_STNDEXCL
00256 };
00257
00258
00259
00260 enum ForceVdw_t {
00261
00262
00263 FORCE_VDW_DIRECT = 0x0001,
00266 FORCE_VDW_GRIDCELLS = 0x0002,
00268 FORCE_VDW_PAIRLISTS = 0x004,
00270 FORCE_VDW_STNDEXCL = 0x0008,
00277
00278 FORCE_VDW_STANDARD = 0x0010,
00280 FORCE_VDW_SWITCHED = 0x0020,
00283 FORCE_VDW_BUCK = 0x0040,
00285 FORCE_VDW_SWITCHBUCK = 0x0080,
00288 FORCE_VDW_BUCKND = 0x0100,
00291 FORCE_VDW_SWITCHBUCKND=0x0200,
00295 FORCE_VDW_BUCKSAFE =0x0400,
00298 FORCE_VDW_SWITCHBUCKSAFE=0x0800,
00301 FORCE_VDW_GLASS =0x1000,
00302
00303
00304 FORCE_VDW_BUCKPRM_BKS =0x10000,
00306 FORCE_VDW_BUCKPRM_TTAM =0x20000,
00308 FORCE_VDW_BUCKPRM_FB =0x40000,
00310 FORCE_VDW_GLASSPRM =0x80000,
00311
00312
00313 FORCE_MASK_VDW_METHOD = 0x000f,
00315 FORCE_MASK_VDW_POTENTIAL = 0x1ff0,
00317 FORCE_MASK_VDW_BUCK = 0x1fc0,
00319 FORCE_MASK_VDW_BUCKPRM = 0xf0000,
00323
00324 FORCE_VDWOPTS_DIRECT = FORCE_VDW_DIRECT | FORCE_VDW_STANDARD,
00326 FORCE_VDWOPTS_CUTOFF = FORCE_VDW_GRIDCELLS | FORCE_VDW_SWITCHED,
00328 FORCE_VDWOPTS_LONGRNG = FORCE_VDW_STNDEXCL
00331 };
00332
00333
00334
00335
00336 enum ForceBrestype_t {
00337 FORCE_BRES_SPHERE = 0x001,
00339 FORCE_BRES_X_CYLINDER,
00342 FORCE_BRES_Y_CYLINDER,
00345 FORCE_BRES_Z_CYLINDER,
00348 FORCE_MARKER_BRES
00351 };
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370 #define FORCE_DEFAULT_SHELL_WIDTH 3
00371 #define FORCE_DEFAULT_CUTOFF_RATIO (1./FORCE_DEFAULT_SHELL_WIDTH)
00372 #define FORCE_DEFAULT_CELL_MARGIN FLT_EPSILON
00373 #define FORCE_DEFAULT_PAIRLIST_DELTA_DIS 0.75
00374 #define FORCE_DEFAULT_GRIDCELL_DELTA_DIS 0.0
00375
00376
00377
00378
00388 ForceParam *force_param_create(void);
00389
00395 void force_param_destroy(ForceParam *);
00396
00397
00405 int force_param_initialize(ForceParam *);
00406
00412 void force_param_cleanup(ForceParam *);
00413
00414
00415 #ifdef __cplusplus
00416 }
00417 #endif
00418
00419 #endif