00001
00002
00003
00004
00014 #ifndef FRESULT_H
00015 #define FRESULT_H
00016
00017 #include "force/fparam.h"
00018
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022
00023
00039 typedef struct ForceResult_t {
00040
00041
00042 double u_total;
00044 double u_bond;
00045 double u_angle;
00046 double u_dihed;
00047 double u_impr;
00048 double u_elec;
00049 double u_vdw;
00050 double u_bres;
00052
00053 double virial[9];
00055
00056 MD_Dvec *f_total;
00058 MD_Dvec *f_bond;
00060 MD_Dvec *f_angle;
00062 MD_Dvec *f_dihed;
00064 MD_Dvec *f_impr;
00066 MD_Dvec *f_elec;
00068 MD_Dvec *f_vdw;
00070 MD_Dvec *f_bres;
00073
00074 double *e_bond;
00076 double *e_angle;
00078 double *e_dihed;
00080 double *e_impr;
00082 double *e_elec;
00084 double *e_vdw;
00086 double *e_bres;
00088 double *e_epot;
00091 int32 self_alloc;
00093 } ForceResult;
00094
00095
00096 enum ForceResultFlags_t {
00097 FORCE_RESULT_F_BOND = 0x0001,
00099 FORCE_RESULT_F_ANGLE = 0x0002,
00101 FORCE_RESULT_F_DIHED = 0x0004,
00103 FORCE_RESULT_F_IMPR = 0x0008,
00105 FORCE_RESULT_F_ELEC = 0x0010,
00107 FORCE_RESULT_F_VDW = 0x0020,
00109 FORCE_RESULT_F_BRES = 0x0040,
00112 FORCE_RESULT_E_BOND = 0x0100,
00114 FORCE_RESULT_E_ANGLE = 0x0200,
00116 FORCE_RESULT_E_DIHED = 0x0400,
00118 FORCE_RESULT_E_IMPR = 0x0800,
00120 FORCE_RESULT_E_ELEC = 0x1000,
00122 FORCE_RESULT_E_VDW = 0x2000,
00124 FORCE_RESULT_E_BRES = 0x4000,
00126 FORCE_RESULT_E_EPOT = 0x8000,
00129 FORCE_RESULT_ALL_F = 0x007f,
00130 FORCE_RESULT_ALL_E = 0xff00,
00131 FORCE_RESULT_ALL = FORCE_RESULT_ALL_F | FORCE_RESULT_ALL_E
00132 };
00133
00134
00149 ForceResult *force_result_create(const ForceParam *fprm, int32 alloc_flags);
00150
00156 void force_result_destroy(ForceResult *);
00157
00158
00171 int force_result_initialize(ForceResult *, const ForceParam *fprm,
00172 int32 alloc_flags);
00173
00179 void force_result_cleanup(ForceResult *);
00180
00181
00182 #ifdef __cplusplus
00183 }
00184 #endif
00185
00186 #endif