Main Page | Class List | File List | Class Members | File Members

force.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2004-2006 by David J. Hardy.  All rights reserved.
00003  */
00004 
00080 #ifndef FORCE_H
00081 #define FORCE_H
00082 
00083  /* provides MD type definitions and data structures */
00084 #include "mdapi/mdtypes.h"
00085 
00086  /* helper classes */
00087 #include "force/fparam.h"
00088 #include "force/fdomain.h"
00089 #include "force/fresult.h"
00090 #include "force/fselect.h"
00091 
00092 #ifdef __cplusplus
00093 extern "C" {
00094 #endif
00095 
00096 #define FORCE_FAIL (-1)  
00104   struct Force_t;
00105   typedef struct Force_t Force;
00106 
00107 
00108 
00109 /******************************************************************************
00110  *
00111  * top-level interface routines
00112  *
00113  *****************************************************************************/
00114 
00115 
00141   Force *force_create(ForceParam *fprm, ForceDomain *fdom, ForceSelect *fsel,
00142       const MD_Dvec initpos[]);
00143 
00144 
00150   void force_destroy(Force *);
00151 
00152 
00170   int force_compute(Force *, ForceResult *fres, const MD_Dvec pos[]);
00171 
00172 
00186   int force_update_domain(Force *, ForceDomain *fdom);
00187 
00188 
00189 
00190 /******************************************************************************
00191  *
00192  * alternative constructor/destructor
00193  *
00194  *****************************************************************************/
00195 
00196 
00205   int force_initialize(Force *, ForceParam *fprm, ForceDomain *fdom,
00206       ForceSelect *fsel, const MD_Dvec initpos[]);
00207 
00208 
00214   void force_cleanup(Force *);
00215 
00216 
00217 
00218 /******************************************************************************
00219  *
00220  * get some force data arrays
00221  *
00222  *****************************************************************************/
00223 
00224 
00231   const MD_Dvec *force_get_poswrap(const Force *);
00232 
00233 
00236   const MD_Dvec *force_get_scaled_coords(const Force *);
00237 
00238 
00248   int32 **force_get_excl_list(const Force *);
00249 
00250 
00258   int32 **force_get_scaled14_list(const Force *);
00259 
00260 
00261 
00262 /******************************************************************************
00263  *
00264  * get domain cell values
00265  *
00266  *****************************************************************************/
00267 
00268   double force_get_volume(const Force *);
00269   const MD_Dvec *force_get_cell_center(const Force *);
00270   const MD_Dvec *force_get_cell_vectors(const Force *);
00271   const double *force_get_cell_lengths(const Force *);
00272   const MD_Dvec *force_get_row_transform(const Force *);
00273   int32 force_get_cell_boundary(const Force *);
00274   int32 force_get_domain_update(const Force *);
00275 
00276 
00277 
00278 /******************************************************************************
00279  *
00280  * request and retrieve min and max scaled coordinates
00281  * (useful for nonperiodic systems)
00282  *
00283  *****************************************************************************/
00284 
00285   int force_setup_scaled_minmax(Force *);
00286   const MD_Dvec *force_get_scaled_minmax(const Force *);
00287 
00288 
00289 
00290 /******************************************************************************
00291  *
00292  * request a fixed lattice and retrieve lattice spacings
00293  * (useful for particle pair potential interpolation of nonperiodic systems)
00294  *
00295  *****************************************************************************/
00296 
00297   int force_setup_lattice(Force *, int32 k1, int32 k2, int32 k3);
00298   const MD_Dvec *force_get_lattice_spacings(const Force *);
00299 
00300 
00301 #ifdef __cplusplus
00302 }
00303 #endif
00304 
00305 /* force object internals */
00306 #include "force/defn.h"
00307 
00308 /* lower-level routines */
00309 #include "force/setup.h"
00310 #include "force/compute.h"
00311 
00312 #endif /* FORCE_H */

Generated on Thu Feb 7 18:11:40 2008 for MDX by  doxygen 1.3.9.1