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

msmpot_setup.c File Reference

#include "msmpot_internal.h"

Go to the source code of this file.

Compounds

struct  InterpParams_t

Typedefs

typedef InterpParams_t InterpParams

Functions

int Msmpot_check_params (Msmpot *msm, const float *epotmap, int mx, int my, int mz, float lx, float ly, float lz, float vx, float vy, float vz, const float *atom, int natoms)
void Msmpot_set_defaults (Msmpot *msm)
int Msmpot_configure (Msmpot *msm, int interp, int split, float cutoff, float hmin, int nlevels, float density, float binfill, float errtol, int usecuda)
void Msmpot_cleanup (Msmpot *msm)
int setup_domain (Msmpot *msm)
int setup_bins (Msmpot *msm)
int setup_origin (Msmpot *msm)
int setup_hierarchy (Msmpot *msm)
int setup_periodic_hlevelparams_1d (Msmpot *msm, float len, float *hh, int *nn, int *aindex, int *bindex)
int setup_nonperiodic_hlevelparams_1d (Msmpot *msm, float len, float *hh, int *nn, int *aindex, int *bindex)
int setup_mapinterp (Msmpot *msm)
int setup_mapinterpcoef_1d (Msmpot *msm, float h, float delta, int n, int m, float *p_h_delta, int *p_cycle, int *p_rmap, float **p_phi, int *p_max_phi)
int Msmpot_setup (Msmpot *msm)
int gcd (int a, int b)

Variables

InterpParams INTERP_PARAMS []


Typedef Documentation

typedef struct InterpParams_t InterpParams
 


Function Documentation

int gcd int    a,
int    b
[static]
 

Definition at line 402 of file msmpot_setup.c.

Referenced by setup_mapinterpcoef_1d.

int Msmpot_check_params Msmpot   msm,
const float *    epotmap,
int    mx,
int    my,
int    mz,
float    lx,
float    ly,
float    lz,
float    vx,
float    vy,
float    vz,
const float *    atom,
int    natoms
 

Definition at line 21 of file msmpot_setup.c.

References ERRMSG, Msmpot_t::hmin, MSMPOT_ERROR_PARAM, MSMPOT_SUCCESS, and NULL.

Referenced by Msmpot_compute.

void Msmpot_cleanup Msmpot   msm
 

Definition at line 132 of file msmpot_setup.c.

References Msmpot_t::bin, Msmpot_t::bincount, Msmpot_t::boff, Msmpot_t::eh, Msmpot_t::eyzd, Msmpot_t::ezd, Msmpot_t::first_atom_index, Msmpot_t::gc, GRID_DONE, Msmpot_t::lyzd, Msmpot_t::lzd, Msmpot_t::maxlevels, Msmpot_t::next_atom_index, Msmpot_t::over, Msmpot_t::phi_x, Msmpot_t::phi_y, Msmpot_t::phi_z, and Msmpot_t::qh.

Referenced by Msmpot_destroy.

int Msmpot_configure Msmpot   msm,
int    interp,
int    split,
float    cutoff,
float    hmin,
int    nlevels,
float    density,
float    binfill,
float    errtol,
int    usecuda
 

Definition at line 75 of file msmpot_setup.c.

References Msmpot_t::a, Msmpot_t::binfill, DEFAULT_BINFILL, DEFAULT_CUTOFF, DEFAULT_DENSITY, DEFAULT_ERRTOL, DEFAULT_HMIN, Msmpot_t::density, ERROR, Msmpot_t::errtol, Msmpot_t::hmin, Msmpot_t::interp, MSMPOT_ERROR_PARAM, MSMPOT_ERROR_SUPPORT, MSMPOT_INTERPMAX, MSMPOT_SPLITMAX, MSMPOT_SUCCESS, Msmpot_t::nlevels, and Msmpot_t::split.

Referenced by VolMapCreateCoulombPotentialMSM::compute_frame.

void Msmpot_set_defaults Msmpot   msm
 

Definition at line 56 of file msmpot_setup.c.

References Msmpot_t::a, Msmpot_t::bindepth, Msmpot_t::binfill, DEFAULT_BINDEPTH, DEFAULT_BINFILL, DEFAULT_CUTOFF, DEFAULT_DENSITY, DEFAULT_ERRTOL, DEFAULT_HMIN, DEFAULT_INTERP, DEFAULT_SPLIT, Msmpot_t::density, Msmpot_t::errtol, Msmpot_t::hmin, Msmpot_t::interp, and Msmpot_t::split.

Referenced by Msmpot_create.

int Msmpot_setup Msmpot   msm
 

Definition at line 205 of file msmpot_setup.c.

References ERROR, Msmpot_t::lx, Msmpot_t::ly, Msmpot_t::lz, Msmpot_cuda_setup, MSMPOT_SUCCESS, Msmpot_t::px, Msmpot_t::py, Msmpot_t::pz, REPORT, setup_bins, setup_domain, setup_hierarchy, setup_mapinterp, and setup_origin.

Referenced by Msmpot_compute.

int setup_bins Msmpot   msm [static]
 

Definition at line 628 of file msmpot_setup.c.

References ASSERT, ATOM_SIZE, Msmpot_t::bin, Msmpot_t::bincount, Msmpot_t::bindepth, Msmpot_t::binfill, Msmpot_t::bx, Msmpot_t::by, Msmpot_t::bz, DEFAULT_OVER, Msmpot_t::density, ERROR, Msmpot_t::first_atom_index, Msmpot_t::invbx, Msmpot_t::invby, Msmpot_t::invbz, Msmpot_t::maxatoms, Msmpot_t::maxbin, Msmpot_t::maxover, MSMPOT_ERROR_MALLOC, MSMPOT_SUCCESS, Msmpot_t::natoms, Msmpot_t::nbx, Msmpot_t::nby, Msmpot_t::nbz, Msmpot_t::next_atom_index, NULL, Msmpot_t::over, Msmpot_t::px, Msmpot_t::py, and Msmpot_t::pz.

Referenced by Msmpot_setup.

int setup_domain Msmpot   msm [static]
 

Definition at line 490 of file msmpot_setup.c.

References ASSERT, Msmpot_t::atom, ATOM_X, ATOM_Y, ATOM_Z, Msmpot_t::dx, Msmpot_t::dy, Msmpot_t::dz, IS_SET_X, IS_SET_Y, IS_SET_Z, Msmpot_t::isperiodic, Msmpot_t::lx, Msmpot_t::lx0, Msmpot_t::ly, Msmpot_t::ly0, Msmpot_t::lz, Msmpot_t::lz0, MSMPOT_SUCCESS, n, Msmpot_t::natoms, Msmpot_t::px, Msmpot_t::px0, Msmpot_t::py, Msmpot_t::py0, Msmpot_t::pz, Msmpot_t::pz0, Msmpot_t::xmax, Msmpot_t::xmin, Msmpot_t::ymax, Msmpot_t::ymin, z, Msmpot_t::zmax, and Msmpot_t::zmin.

Referenced by Msmpot_setup.

int setup_hierarchy Msmpot   msm [static]
 

Definition at line 802 of file msmpot_setup.c.

References Msmpot_t::a, ASSERT, Msmpot_t::dx, Msmpot_t::dy, Msmpot_t::dz, Msmpot_t::eh, ERROR, Msmpot_t::gc, GRID_INDEX, GRID_INDEX_CHECK, GRID_INIT, GRID_RESIZE, Msmpot_t::hx, Msmpot_t::hy, Msmpot_t::hz, Msmpot_t::interp, IS_SET_ANY, IS_SET_X, IS_SET_Y, IS_SET_Z, Msmpot_t::isperiodic, Msmpot_t::lx, Msmpot_t::lx0, Msmpot_t::ly, Msmpot_t::ly0, Msmpot_t::lyzd, Msmpot_t::lz, Msmpot_t::lz0, Msmpot_t::lzd, Msmpot_t::max_lyzd, Msmpot_t::max_lzd, Msmpot_t::maxlevels, MSMPOT_ERROR_MALLOC, n, Msmpot_t::nlevels, NULL, Msmpot_t::nx, Msmpot_t::ny, Msmpot_t::nz, Msmpot_t::px, Msmpot_t::px0, Msmpot_t::py, Msmpot_t::py0, Msmpot_t::pz, Msmpot_t::pz0, Msmpot_t::qh, setup_nonperiodic_hlevelparams_1d, setup_periodic_hlevelparams_1d, Msmpot_t::split, SPOLY, Msmpot_t::xmax, Msmpot_t::ymax, and Msmpot_t::zmax.

Referenced by Msmpot_setup.

int setup_mapinterp Msmpot   msm [static]
 

Definition at line 353 of file msmpot_setup.c.

References ASSERT, Msmpot_t::cycle_x, Msmpot_t::cycle_y, Msmpot_t::cycle_z, Msmpot_t::dx, Msmpot_t::dy, Msmpot_t::dz, ERRMSG, ERROR, Msmpot_t::eyzd, Msmpot_t::ezd, Msmpot_t::hx, Msmpot_t::hx_dx, Msmpot_t::hy, Msmpot_t::hy_dy, Msmpot_t::hz, Msmpot_t::hz_dz, Msmpot_t::lx, Msmpot_t::ly, Msmpot_t::lz, Msmpot_t::max_eyzd, Msmpot_t::max_ezd, Msmpot_t::max_phi_x, Msmpot_t::max_phi_y, Msmpot_t::max_phi_z, MSMPOT_ERROR_MALLOC, MSMPOT_ERROR_SUPPORT, MSMPOT_SUCCESS, Msmpot_t::mx, Msmpot_t::my, Msmpot_t::mz, NULL, Msmpot_t::nx, Msmpot_t::ny, Msmpot_t::nz, Msmpot_t::phi_x, Msmpot_t::phi_y, Msmpot_t::phi_z, Msmpot_t::px, Msmpot_t::py, Msmpot_t::pz, Msmpot_t::rmap_x, Msmpot_t::rmap_y, Msmpot_t::rmap_z, and setup_mapinterpcoef_1d.

Referenced by Msmpot_setup.

int setup_mapinterpcoef_1d Msmpot   msm,
float    h,
float    delta,
int    n,
int    m,
float *    p_h_delta,
int *    p_cycle,
int *    p_rmap,
float **    p_phi,
int *    p_max_phi
[static]
 

Definition at line 413 of file msmpot_setup.c.

References ASSERT, ERRMSG, ERROR, gcd, Msmpot_t::interp, MSMPOT_ERROR_MALLOC, MSMPOT_ERROR_SUPPORT, MSMPOT_INTERP_CUBIC, MSMPOT_INTERP_QUINTIC, MSMPOT_SUCCESS, n, and NULL.

Referenced by setup_mapinterp.

int setup_nonperiodic_hlevelparams_1d Msmpot   msm,
float    len,
float *    hh,
int *    nn,
int *    aindex,
int *    bindex
[static]
 

Definition at line 749 of file msmpot_setup.c.

References Msmpot_t::hmin, Msmpot_t::interp, MSMPOT_SUCCESS, and n.

Referenced by setup_hierarchy.

int setup_origin Msmpot   msm [static]
 

Definition at line 693 of file msmpot_setup.c.

References Msmpot_t::a, Msmpot_t::bx, Msmpot_t::by, Msmpot_t::bz, Msmpot_t::invbx, Msmpot_t::invby, Msmpot_t::invbz, IS_SET_X, IS_SET_Y, IS_SET_Z, Msmpot_t::isbinwrap, Msmpot_t::islongcutoff, Msmpot_t::isperiodic, Msmpot_t::lx, Msmpot_t::lx0, Msmpot_t::ly, Msmpot_t::ly0, Msmpot_t::lz, Msmpot_t::lz0, MSMPOT_SUCCESS, Msmpot_t::nbx, Msmpot_t::nby, Msmpot_t::nbz, Msmpot_t::px, Msmpot_t::px0, Msmpot_t::py, Msmpot_t::py0, Msmpot_t::pz, Msmpot_t::pz0, SET_X, SET_Y, and SET_Z.

Referenced by Msmpot_setup.

int setup_periodic_hlevelparams_1d Msmpot   msm,
float    len,
float *    hh,
int *    nn,
int *    aindex,
int *    bindex
[static]
 

Definition at line 768 of file msmpot_setup.c.

References ERRMSG, Msmpot_t::hmin, MSMPOT_ERROR_PARAM, MSMPOT_SUCCESS, and n.

Referenced by setup_hierarchy.


Variable Documentation

InterpParams INTERP_PARAMS[] [static]
 

Initial value:

 {
  { 1, 4, 6 },    
  { 2, 6, 10 },   
  { 2, 6, 10 },   
  { 3, 8, 14 },   
  { 3, 8, 14 },   
  { 4, 10, 18 },  
  { 4, 10, 18 },  
}

Definition at line 260 of file msmpot_setup.c.


Generated on Fri Apr 19 02:45:53 2024 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002