Main Page   Modules   Compound List   File List   Compound Members   File Members  

ssystem class

Class that defines the "master object" for the simulation software. More...


Files

file  ssystem.h
 Data members and function declarations for class ssystem.


Compounds

struct  ssystem
 Class for simulation system objects. More...


Defines

#define _SSYSTEM_H_   1
 Environment variable for 'ssystem.h'.


Functions

ssystem * ssystem_ctor ()
 Constructor for the ssystem object. More...

void ssystem_dtor (ssystem *thee)
 Destructor for the ssystem object. More...

double sphere_volume (ssystem *thee)
 Volume calculation for a sphere. More...

double cylinder_volume (ssystem *thee)
 Volume calculation for a cylinder. More...

void sphere_valid_xyz (ssystem *thee, double *xyz)
 Generate a point (Cartesian in ) inside the solvent- accessible volume of a sphere (accessibility is mediated by the macromolecule object hidden in 'thee'). More...

void cylinder_valid_xyz (ssystem *thee, double *xyz)
 Generate a point (Cartesian in ) inside the solvent- accessible volume of a cylinder (accessibility is mediated by the macromolecule object hidden in 'thee'). More...

void sphere_move_one (ssystem *thee, int type, int pos)
 Move a specified ion hidden in 'thee->ions' under the restriction of the spherical system boundaries, updates the coordinates array within the ionlist object directly. More...

void cylinder_move_one (ssystem *thee, int type, int pos)
 Move a specified ion hidden in 'thee->ions' under the restriction of the cylindrical system boundaries, updates the coordinates array within the ionlist object directly. More...

void sphere_move_some (ssystem *thee, int type, int start, int nr, double *coordsnew[])
 Move some specified ions hidden in 'thee->ions' under the restriction of the spherical system boundaries, writes the new coordinates to temporary array. More...

void cylinder_move_some (ssystem *thee, int type, int start, int nr, double *coordsnew[])
 Move some specified ions hidden in 'thee->ions' under the restriction of the cylindrical system boundaries, writes the new coordinates to temporary array. More...

void ssystem_setup (ssystem *thee)
 Setup routine for the ssystem object (i.e. the whole simulation). More...

int ssystem_parprepare (ssystem *thee)
 Additional setup function used in parametrization mode. More...

void ssystem_process_results (ssystem *thee)
 Transforms the primary results obtained in a parametrization simulation into excess chemical potentials. More...

void ssystem_calculate_expects (ssystem *thee)
 Calculate numbers for ions in solvent-accessible volume according to specific ion concentrations and system size when assuming a bulk electrolyte solution. More...

void ssystem_populate (ssystem *thee)
 Populate the simulation system with initial (bulk) numbers of ions of each type in an entirely random conformation (the only restrictions are the system boundaries and the solvent accessiblity of the coordinates). More...

void ssystem_creation_destruction (ssystem *thee, int GCsteps, int type)
 Routine provides the "heart" of the whole simulation: Ions are attempted to be created (random, accessible point) and destroyed (random choice) always one for both attempts for each type according to ion type's input order (e.g. if two ionic species "joe" and "jill" are specified, it tries to create one joe-ion, tries to destroy one joe-ion, tries to create one jill-ion and finally tries to destroy one jill-ion). More...

void ssystem_minimization (ssystem *thee, int minsteps, FILE *en)
 This routine is a simple Monte Carlo moving procedure at 0K, ions are attempted to be moved and the energy change is evaluated after each single movement. More...

void ssystem_shuffling (ssystem *thee, int MCsteps, int step, char mode, FILE *en)
 This routine is a simple Monte Carlo moving procedure at the simulation temperature, which offers different modes. More...


Detailed Description

Class that defines the "master object" for the simulation software.

To be able to handle the different simulation systems (cylindrical and spherical ones) function pointers are used (which replace virtual abstract functions and inheritance in clean OO-C)


Function Documentation

void cylinder_move_one ssystem   thee,
int    type,
int    pos
 

Move a specified ion hidden in 'thee->ions' under the restriction of the cylindrical system boundaries, updates the coordinates array within the ionlist object directly.

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object
type  Integer number specifying the type of the deleted ion (in terms of 'ions'-indexing)
pos  Integer number specifying the position of the x-coordinate of ion to be moved within the 'ions'-coordinates array

void cylinder_move_some ssystem   thee,
int    type,
int    start,
int    nr,
double *    coordsnew[]
 

Move some specified ions hidden in 'thee->ions' under the restriction of the cylindrical system boundaries, writes the new coordinates to temporary array.

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object
type  Integer number specifying the type of the deleted ion (in terms of 'ions'-indexing)
start  Integer number specifying the position of the x-coordinate of the first ion to be moved within the 'ions'-coordinates array
nr  Integer number representing the number of ions to be moved (taken in order)
coordsnew  Array of pointers used to hold modified coordinates (first index for ion types, second one in form of {x1,y1,z1,x2,y2,z2,...,xn,yn,zn} (starting at '1') for explicit Cartesian coordinates in

void cylinder_valid_xyz ssystem   thee,
double *    xyz
 

Generate a point (Cartesian in ) inside the solvent- accessible volume of a cylinder (accessibility is mediated by the macromolecule object hidden in 'thee').

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object
xyz  pointer to coordinate array to hold the point (Cartesian in )

double cylinder_volume ssystem   thee
 

Volume calculation for a cylinder.

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object
Returns:
Total volume in

void sphere_move_one ssystem   thee,
int    type,
int    pos
 

Move a specified ion hidden in 'thee->ions' under the restriction of the spherical system boundaries, updates the coordinates array within the ionlist object directly.

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object
type  Integer number specifying the type of the deleted ion (in terms of 'ions'-indexing)
pos  Integer number specifying the position of the x-coordinate of ion to be moved within the 'ions'-coordinates array

void sphere_move_some ssystem   thee,
int    type,
int    start,
int    nr,
double *    coordsnew[]
 

Move some specified ions hidden in 'thee->ions' under the restriction of the spherical system boundaries, writes the new coordinates to temporary array.

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object
type  Integer number specifying the type of the deleted ion (in terms of 'ions'-indexing)
start  Integer number specifying the position of the x-coordinate of the first ion to be moved within the 'ions'-coordinates array
nr  Integer number representing the number of ions to be moved (taken in order)
coordsnew  Array of pointers used to hold modified coordinates (first index for ion types, second one in form of {x1,y1,z1,x2,y2,z2,...,xn,yn,zn} (starting at '1') for explicit Cartesian coordinates in

void sphere_valid_xyz ssystem   thee,
double *    xyz
 

Generate a point (Cartesian in ) inside the solvent- accessible volume of a sphere (accessibility is mediated by the macromolecule object hidden in 'thee').

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object
xyz  pointer to coordinate array to hold the point (Cartesian in )

double sphere_volume ssystem   thee
 

Volume calculation for a sphere.

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object
Returns:
Total volume in

void ssystem_calculate_expects ssystem   thee
 

Calculate numbers for ions in solvent-accessible volume according to specific ion concentrations and system size when assuming a bulk electrolyte solution.

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object

void ssystem_creation_destruction ssystem   thee,
int    GCsteps,
int    type
 

Routine provides the "heart" of the whole simulation: Ions are attempted to be created (random, accessible point) and destroyed (random choice) always one for both attempts for each type according to ion type's input order (e.g. if two ionic species "joe" and "jill" are specified, it tries to create one joe-ion, tries to destroy one joe-ion, tries to create one jill-ion and finally tries to destroy one jill-ion).

All necessary information is updated throughout the procedure

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object
type  In parametrization mode this specifies the only ion type, which is supposed to be created and destructed.
GCsteps  Number of cycles to be performed within one function call

ssystem* ssystem_ctor  
 

Constructor for the ssystem object.

Author:
Andreas Vitalis
Returns:
Ssytem object

void ssystem_dtor ssystem   thee
 

Destructor for the ssystem object.

Calls destructor functions for 'params' object, 'energy' object, 'macromolecule' object and has a pseudo-destructor function for the 'ionlist' objects in addition to its "normal" function

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object

void ssystem_minimization ssystem   thee,
int    minsteps,
FILE *    en
 

This routine is a simple Monte Carlo moving procedure at 0K, ions are attempted to be moved and the energy change is evaluated after each single movement.

One step is completed after every ion has been attempted to be moved once

One preliminary total energy evaluation is performed and later on all necessary information is updated throughout the procedure

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object
minsteps  Number of steps to be performed within one function call
en  File pointer for minimization energy output

int ssystem_parprepare ssystem   thee
 

Additional setup function used in parametrization mode.

Also does multiple tasks like reading in the concentration schemes, finding an appropriate simulation system (size), calculating ion numbers and most significantly keep track of the whole parametrization procedure with the help of various counters

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object
Returns:
Indicative number of procedure is complete and the type number of the ion currently processed otherwise

void ssystem_populate ssystem   thee
 

Populate the simulation system with initial (bulk) numbers of ions of each type in an entirely random conformation (the only restrictions are the system boundaries and the solvent accessiblity of the coordinates).

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object

void ssystem_process_results ssystem   thee
 

Transforms the primary results obtained in a parametrization simulation into excess chemical potentials.

The function 'ssystem_parprepare' writes out a table of results (excess chemical potential vs. mean ion number) for each concentration set and for each species, regression then yields the excess chemical potential value finally used by substituting the number expectation value into the linear equation

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object

void ssystem_setup ssystem   thee
 

Setup routine for the ssystem object (i.e. the whole simulation).

Does multiple tasks like transferring parameters from 'thee->parameters' to other components, assigning function pointers, calling necessary constructor as well as other initialization functions and documentates it all in the log-file

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object

void ssystem_shuffling ssystem   thee,
int    MCsteps,
int    step,
char    mode,
FILE *    en
 

This routine is a simple Monte Carlo moving procedure at the simulation temperature, which offers different modes.

Either all ions are attempted to be moved an the energy is evaluated afterwards ('A') or just some ('S') ions of one type or just one ('N') are treated analagously

One step is completed after every ion has been attempted to be moved once

All necessary information is updated throughout the procedure

Author:
Andreas Vitalis
Parameters:
thee  Ssytem object
MCsteps  Number of steps to be performed within one function call
step  Current step of the whole simulation procedure (necessary for output)
mode  Character indicating the shuffling mode (see above)
en  File pointer for shuffling energy output


Generated on Tue Jun 18 16:58:39 2002 for ISIM by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002