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

param.h File Reference

Force field parameter file reader. More...

#include "adt/list.h"
#include "adt/table.h"
#include "mdio/file.h"
#include "mdapi/mdtypes.h"

Go to the source code of this file.

Classes

struct  mdio_Param_t
 Force field parameter file reader class. More...

Typedefs

typedef mdio_Param_t mdio_Param
 Force field parameter file reader class.

Functions

mdio_Parammdio_createParam (void)
 Constructor.
void mdio_destroyParam (mdio_Param *)
 Destructor.
int mdio_readParam (mdio_Param *, const char *name)
 Read force field parameter file.
MD_AtomPrm * mdio_getAtomParam (mdio_Param *, int *nelems)
 Obtain array of atom parameters.
MD_BondPrm * mdio_getBondParam (mdio_Param *, int *nelems)
 Obtain array of bond parameters.
MD_AnglePrm * mdio_getAngleParam (mdio_Param *, int *nelems)
 Obtain array of angle parameters.
MD_TorsPrm * mdio_getDihedParam (mdio_Param *, int *nelems)
 Obtain array of dihedral parameters.
MD_TorsPrm * mdio_getImprParam (mdio_Param *, int *nelems)
 Obtain array of improper parameters.
MD_NbfixPrm * mdio_getNbfixParam (mdio_Param *, int *nelems)
 Obtain array of NBfix parameters.
int mdio_initializeParam (mdio_Param *)
 Alternative constructor.
void mdio_cleanupParam (mdio_Param *)
 Alternative destructor.


Detailed Description

Force field parameter file reader.

Author:
David J. Hardy
Date:
2003-2005
The mdio_Param class reads one or more X-Plor force field parameter files, storing the results into arrays of MDAPI force field parameter data types defined in mdtypes.h. These arrays are continued if subsequent parameter files are read.

The mdio_Param class is derived from mdio_File so that error handling is performed by simply typecasting (mdio_Param *) to a (mdio_File *).


Typedef Documentation

typedef struct mdio_Param_t mdio_Param
 

Force field parameter file reader class.

Members should be treated as private.


Function Documentation

void mdio_cleanupParam mdio_Param  ) 
 

Alternative destructor.

Use to destroy a preallocated mdio_Param object (i.e. one constructed using mdio_initializeParam() ).

mdio_Param* mdio_createParam void   ) 
 

Constructor.

Creates dynamically allocated force field parameter file reader object.

Returns:
Pointer to new object or NULL on failure.

void mdio_destroyParam mdio_Param  ) 
 

Destructor.

Frees dynamically allocated force field parameter file reader object after freeing the arrays of collected force field parameter data types.

Note that the force field parameter arrays obtained do not persist beyond destruction of the mdio_Param object.

MD_AnglePrm* mdio_getAngleParam mdio_Param ,
int *  nelems
 

Obtain array of angle parameters.

Parameters:
[out] nelems Length of array returned into indicated variable.
Returns:
The angle parameter array as a pointer.

MD_AtomPrm* mdio_getAtomParam mdio_Param ,
int *  nelems
 

Obtain array of atom parameters.

Parameters:
[out] nelems Length of array returned into indicated variable.
Returns:
The atom parameter array as a pointer.

MD_BondPrm* mdio_getBondParam mdio_Param ,
int *  nelems
 

Obtain array of bond parameters.

Parameters:
[out] nelems Length of array returned into indicated variable.
Returns:
The bond parameter array as a pointer.

MD_TorsPrm* mdio_getDihedParam mdio_Param ,
int *  nelems
 

Obtain array of dihedral parameters.

Parameters:
[out] nelems Length of array returned into indicated variable.
Returns:
The dihedral parameter array as a pointer.

MD_TorsPrm* mdio_getImprParam mdio_Param ,
int *  nelems
 

Obtain array of improper parameters.

Parameters:
[out] nelems Length of array returned into indicated variable.
Returns:
The improper parameter array as a pointer.

MD_NbfixPrm* mdio_getNbfixParam mdio_Param ,
int *  nelems
 

Obtain array of NBfix parameters.

Parameters:
[out] nelems Length of array returned into indicated variable.
Returns:
The NBfix parameter array as a pointer.
Note that the prm[] fields that index the MD_AtomPrm array are left undetermined until the call is made to mdio_indexParamTopo().

int mdio_initializeParam mdio_Param  ) 
 

Alternative constructor.

Use to construct a preallocated mdio_Param object. See mdio_createParam() for a description of expected arguments.

int mdio_readParam mdio_Param ,
const char *  name
 

Read force field parameter file.

Parameters:
[in] name A nil-terminated string naming the force field parameter file.
Opens the file, reads and parses each line of the file, and closes the file. Incrementally builds arrays storing the force field parameter data types. These arrays are continued if subsequent files are read.

Returns:
0 on success, MDIO_ERROR on failure.


Generated on Mon Sep 26 10:55:19 2005 for MDX by  doxygen 1.4.4