Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

VolMapCreate Class Reference

Virtual class for dealing with the computation of VolMaps, based on atomic selections and atomic data and coordinates. It provides utilities for computing such maps. Various algorithms and specific calculations are done by child classes. The end result is a VolMap object, which can be passed to VMD (N/A yet) or written to a file. More...

#include <VolMapCreate.h>

Inheritance diagram for VolMapCreate:

VolMapCreateCoulombPotential VolMapCreateCoulombPotentialMSM VolMapCreateDensity VolMapCreateDistance VolMapCreateInterp VolMapCreateMask VolMapCreateOccupancy List of all members.

Public Types

enum  CombineType {
  COMBINE_AVG, COMBINE_MIN, COMBINE_MAX, COMBINE_STDEV,
  COMBINE_PMF
}

Public Methods

 VolMapCreate (VMDApp *app, AtomSel *sel, float resolution)
virtual ~VolMapCreate ()
void set_minmax (float minx, float miny, float minz, float maxx, float maxy, float maxz)
void set_checkpoint (int checkpointfreq, char *checkpointname)
int compute_all (bool allframes, CombineType method, void *params)
 computes volmap for all (selected) frames and takes the average, min or max depending on what was specified by "method", for most cases, params is unused (set to NULL) XXX the "allframes" param should be a FrameRange object, but for now its a boolean. More...

virtual void write_map (const char *filename)
 For now this will call write_dx_file, but this is going to change to using molfileplugin instead. In VolMapCreate*Energy this method is overridden by one that adds temperature and weight information to the data set name string. More...

int write_dx_file (const char *filename)

Public Attributes

VolumetricDatavolmap

Protected Methods

virtual int compute_frame (int frame, float *voldata)=0
int compute_init (float padding)
virtual int compute_init ()
 called before computing individual frames. More...

int calculate_minmax (float *min_coord, float *max_coord)
 calculates minmax (into preallocated float[3] arrays) using volmapcreate's selection. More...

int calculate_max_radius (float &radius)
 calculates max_radius (into a provided float) using volmapcreate's selection. More...

void combo_begin (CombineType method, void **customptr, void *params)
 for checkpointing. More...

void combo_addframe (CombineType method, float *voldata, void *customptr, float *framedata)
void combo_export (CombineType method, float *voldata, void *customptr)
 Output a copy of the combination buffer, to which a final transform appropriate for the combination type has been applied to. Frames can still be appended to the original combo buffer. This procedure should be used to create the final map as well as each checkpoint map. More...

void combo_end (CombineType method, void *customptr)
 Do some cleaning up of the combination buffer. More...


Protected Attributes

VMDAppapp
AtomSelsel
float delta
int computed_frames
int checkpoint_freq
char * checkpoint_name
bool user_minmax
float min_coord [3]
float max_coord [3]

Detailed Description

Virtual class for dealing with the computation of VolMaps, based on atomic selections and atomic data and coordinates. It provides utilities for computing such maps. Various algorithms and specific calculations are done by child classes. The end result is a VolMap object, which can be passed to VMD (N/A yet) or written to a file.

Definition at line 34 of file VolMapCreate.h.


Member Enumeration Documentation

enum VolMapCreate::CombineType
 

Enumeration values:
COMBINE_AVG 
COMBINE_MIN 
COMBINE_MAX 
COMBINE_STDEV 
COMBINE_PMF 

Definition at line 36 of file VolMapCreate.h.

Referenced by vmd_volmap_new_fromtype.


Constructor & Destructor Documentation

VolMapCreate::VolMapCreate VMDApp   app,
AtomSel   sel,
float    resolution
 

Definition at line 76 of file VolMapCreate.C.

References app, checkpoint_freq, checkpoint_name, computed_frames, delta, NULL, sel, user_minmax, and volmap.

VolMapCreate::~VolMapCreate   [virtual]
 

Definition at line 95 of file VolMapCreate.C.

References checkpoint_name, and volmap.


Member Function Documentation

int VolMapCreate::calculate_max_radius float &    radius [protected]
 

calculates max_radius (into a provided float) using volmapcreate's selection.

Definition at line 160 of file VolMapCreate.C.

References app, NameList< float * >::data, BaseMolecule::extraflt, AtomSel::firstsel, AtomSel::lastsel, MEASURE_ERR_NORADII, MoleculeList::mol_from_id, VMDApp::moleculeList, AtomSel::molid, AtomSel::on, and sel.

Referenced by VolMapCreateDistance::compute_frame, VolMapCreateCoulombPotentialMSM::compute_init, VolMapCreateCoulombPotential::compute_init, VolMapCreateDistance::compute_init, VolMapCreateOccupancy::compute_init, and VolMapCreateDensity::compute_init.

int VolMapCreate::calculate_minmax float *    min_coord,
float *    max_coord
[protected]
 

calculates minmax (into preallocated float[3] arrays) using volmapcreate's selection.

Definition at line 124 of file VolMapCreate.C.

References app, AtomSel::change, AtomSel::coordinates, measure_minmax, MEASURE_NOERR, MoleculeList::mol_from_id, VMDApp::molecule_numframes, VMDApp::moleculeList, AtomSel::molid, NULL, AtomSel::num_atoms, AtomSel::on, sel, and AtomSel::which_frame.

Referenced by compute_init.

void VolMapCreate::combo_addframe CombineType    method,
float *    voldata,
void *    customptr,
float *    framedata
[protected]
 

Definition at line 194 of file VolMapCreate.C.

References COMBINE_AVG, COMBINE_MAX, COMBINE_MIN, COMBINE_PMF, COMBINE_STDEV, computed_frames, MAX, MIN, n, volmap, VolumetricData::xsize, VolumetricData::ysize, and VolumetricData::zsize.

Referenced by compute_all.

void VolMapCreate::combo_begin CombineType    method,
void **    customptr,
void *    params
[protected]
 

for checkpointing.

Definition at line 178 of file VolMapCreate.C.

References COMBINE_STDEV, computed_frames, VolumetricData::data, NULL, volmap, VolumetricData::xsize, VolumetricData::ysize, and VolumetricData::zsize.

Referenced by compute_all.

void VolMapCreate::combo_end CombineType    method,
void *    customptr
[protected]
 

Do some cleaning up of the combination buffer.

Definition at line 278 of file VolMapCreate.C.

References COMBINE_STDEV.

Referenced by compute_all.

void VolMapCreate::combo_export CombineType    method,
float *    voldata,
void *    customptr
[protected]
 

Output a copy of the combination buffer, to which a final transform appropriate for the combination type has been applied to. Frames can still be appended to the original combo buffer. This procedure should be used to create the final map as well as each checkpoint map.

Definition at line 246 of file VolMapCreate.C.

References COMBINE_AVG, COMBINE_MAX, COMBINE_MIN, COMBINE_PMF, COMBINE_STDEV, computed_frames, VolumetricData::data, MAX_ENERGY, n, volmap, VolumetricData::xsize, VolumetricData::ysize, and VolumetricData::zsize.

Referenced by compute_all.

int VolMapCreate::compute_all bool    allframes,
CombineType    method,
void *    params
 

computes volmap for all (selected) frames and takes the average, min or max depending on what was specified by "method", for most cases, params is unused (set to NULL) XXX the "allframes" param should be a FrameRange object, but for now its a boolean.

Definition at line 290 of file VolMapCreate.C.

References app, checkpoint_freq, checkpoint_name, combo_addframe, combo_begin, combo_end, combo_export, compute_frame, compute_init, computed_frames, VolumetricData::data, VMDApp::molecule_numframes, AtomSel::molid, NULL, sel, volmap, AtomSel::which_frame, wkf_timer_create, wkf_timer_destroy, wkf_timer_start, wkf_timer_stop, wkf_timer_time, wkf_timerhandle, write_map, VolumetricData::xsize, VolumetricData::ysize, and VolumetricData::zsize.

Referenced by mask, and vmd_volmap_new_fromtype.

virtual int VolMapCreate::compute_frame int    frame,
float *    voldata
[protected, pure virtual]
 

Implemented in VolMapCreateMask.

Referenced by compute_all.

virtual int VolMapCreate::compute_init   [inline, protected, virtual]
 

called before computing individual frames.

Reimplemented in VolMapCreateMask.

Definition at line 53 of file VolMapCreate.h.

Referenced by compute_all, VolMapCreateCoulombPotentialMSM::compute_init, VolMapCreateCoulombPotential::compute_init, VolMapCreateDistance::compute_init, VolMapCreateOccupancy::compute_init, VolMapCreateInterp::compute_init, VolMapCreateDensity::compute_init, and VolMapCreateMask::compute_init.

int VolMapCreate::compute_init float    padding [protected]
 

Definition at line 379 of file VolMapCreate.C.

References calculate_minmax, delta, MAX, max_coord, MEASURE_ERR_NOATOMS, MEASURE_ERR_NOSEL, MEASURE_ERR_ZEROGRIDSIZE, min_coord, AtomSel::num_atoms, VolumetricData::origin, sel, volmap, VolumetricData::xaxis, VolumetricData::xsize, VolumetricData::yaxis, VolumetricData::ysize, VolumetricData::zaxis, and VolumetricData::zsize.

void VolMapCreate::set_checkpoint int    checkpointfreq,
char *    checkpointname
 

Definition at line 112 of file VolMapCreate.C.

References checkpoint_freq, and checkpoint_name.

Referenced by vmd_volmap_new_fromtype.

void VolMapCreate::set_minmax float    minx,
float    miny,
float    minz,
float    maxx,
float    maxy,
float    maxz
 

Definition at line 101 of file VolMapCreate.C.

References max_coord, min_coord, and user_minmax.

Referenced by vmd_volmap_new_fromtype.

int VolMapCreate::write_dx_file const char *    filename
 

void VolMapCreate::write_map const char *    filename [virtual]
 

For now this will call write_dx_file, but this is going to change to using molfileplugin instead. In VolMapCreate*Energy this method is overridden by one that adds temperature and weight information to the data set name string.

Definition at line 1236 of file VolMapCreate.C.

References volmap, and volmap_write_dx_file.

Referenced by compute_all, and vmd_volmap_new_fromtype.


Member Data Documentation

VMDApp* VolMapCreate::app [protected]
 

Definition at line 39 of file VolMapCreate.h.

Referenced by calculate_max_radius, calculate_minmax, compute_all, VolMapCreateCoulombPotentialMSM::compute_frame, VolMapCreateCoulombPotential::compute_frame, VolMapCreateDistance::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateInterp::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, VolMapCreate, VolMapCreateCoulombPotential::VolMapCreateCoulombPotential, VolMapCreateCoulombPotentialMSM::VolMapCreateCoulombPotentialMSM, VolMapCreateDensity::VolMapCreateDensity, VolMapCreateDistance::VolMapCreateDistance, VolMapCreateInterp::VolMapCreateInterp, VolMapCreateMask::VolMapCreateMask, and VolMapCreateOccupancy::VolMapCreateOccupancy.

int VolMapCreate::checkpoint_freq [protected]
 

Definition at line 43 of file VolMapCreate.h.

Referenced by compute_all, set_checkpoint, and VolMapCreate.

char* VolMapCreate::checkpoint_name [protected]
 

Definition at line 44 of file VolMapCreate.h.

Referenced by compute_all, set_checkpoint, VolMapCreate, and ~VolMapCreate.

int VolMapCreate::computed_frames [protected]
 

Definition at line 42 of file VolMapCreate.h.

Referenced by combo_addframe, combo_begin, combo_export, compute_all, and VolMapCreate.

float VolMapCreate::delta [protected]
 

Definition at line 41 of file VolMapCreate.h.

Referenced by VolMapCreateCoulombPotentialMSM::compute_frame, VolMapCreateCoulombPotential::compute_frame, VolMapCreateDistance::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateInterp::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, VolMapCreateInterp::compute_init, compute_init, and VolMapCreate.

float VolMapCreate::max_coord[3] [protected]
 

Definition at line 46 of file VolMapCreate.h.

Referenced by compute_init, and set_minmax.

float VolMapCreate::min_coord[3] [protected]
 

Definition at line 46 of file VolMapCreate.h.

Referenced by compute_init, and set_minmax.

AtomSel* VolMapCreate::sel [protected]
 

Definition at line 40 of file VolMapCreate.h.

Referenced by calculate_max_radius, calculate_minmax, compute_all, VolMapCreateCoulombPotentialMSM::compute_frame, VolMapCreateCoulombPotential::compute_frame, VolMapCreateDistance::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateInterp::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, VolMapCreateCoulombPotentialMSM::compute_init, VolMapCreateCoulombPotential::compute_init, VolMapCreateDistance::compute_init, VolMapCreateOccupancy::compute_init, VolMapCreateInterp::compute_init, VolMapCreateDensity::compute_init, VolMapCreateMask::compute_init, compute_init, VolMapCreate, VolMapCreateCoulombPotential::VolMapCreateCoulombPotential, VolMapCreateCoulombPotentialMSM::VolMapCreateCoulombPotentialMSM, VolMapCreateDensity::VolMapCreateDensity, VolMapCreateDistance::VolMapCreateDistance, VolMapCreateInterp::VolMapCreateInterp, VolMapCreateMask::VolMapCreateMask, and VolMapCreateOccupancy::VolMapCreateOccupancy.

bool VolMapCreate::user_minmax [protected]
 

Definition at line 45 of file VolMapCreate.h.

Referenced by set_minmax, and VolMapCreate.

VolumetricData* VolMapCreate::volmap
 

Definition at line 69 of file VolMapCreate.h.

Referenced by combo_addframe, combo_begin, combo_export, compute_all, VolMapCreateCoulombPotentialMSM::compute_frame, VolMapCreateCoulombPotential::compute_frame, VolMapCreateDistance::compute_frame, VolMapCreateOccupancy::compute_frame, VolMapCreateInterp::compute_frame, VolMapCreateDensity::compute_frame, VolMapCreateMask::compute_frame, VolMapCreateCoulombPotentialMSM::compute_init, VolMapCreateCoulombPotential::compute_init, VolMapCreateDistance::compute_init, VolMapCreateOccupancy::compute_init, VolMapCreateInterp::compute_init, VolMapCreateDensity::compute_init, VolMapCreateMask::compute_init, compute_init, mask, vmd_volmap_new_fromtype, VolMapCreate, write_map, and ~VolMapCreate.


The documentation for this class was generated from the following files:
Generated on Thu Apr 18 02:47:32 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002