Psi4
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
psi::CubicScalarGrid Class Reference

#include <csg.h>

Public Member Functions

 CubicScalarGrid (std::shared_ptr< BasisSet > primary, Options &options)
 
virtual ~CubicScalarGrid ()
 
void build_grid ()
 Build grid with options overages. More...
 
void build_grid (const std::string filepath, int *N, double *D, double *O)
 Build grid with specified geometry (e.g., from another grid) More...
 
void build_grid (std::shared_ptr< CubicScalarGrid > other)
 Build grid from the dimensions in another grid. More...
 
void print_header ()
 Header info. More...
 
void set_auxiliary_basis (std::shared_ptr< BasisSet > aux)
 Set the auxiliary for ESP if desired. More...
 
void set_filepath (const std::string filepath)
 Set the directory for cube file storage (defaults to "./") More...
 
int * N () const
 Number of voxels in [x,y,z]. Number of points along each dimensions in N_i + 1. More...
 
double * D () const
 Voxel width in [x,y,z], in bohr. More...
 
double * O () const
 Lower-left corner of th grid, in bohr. More...
 
std::string filepath () const
 Filepath where grid output will be stored. More...
 
size_t npoints () const
 Total number of points in grid. More...
 
size_t nxyz () const
 Number of points. More...
 
double * x () const
 x points in fast ordering More...
 
double * y () const
 y points in fast ordering More...
 
double * z () const
 z points in fast ordering More...
 
double * w () const
 w weights (rectangular) in fast ordering More...
 
void write_gen_file (double *v, const std::string &name, const std::string &type)
 Write a general file of the scalar field v (in fast ordering) to filepath/name.ext. More...
 
void write_cube_file (double *v, const std::string &name)
 Write a Gaussian cube file of the scalar field v (in fast ordering) to filepath/name.cube. More...
 
void add_density (double *v, std::shared_ptr< Matrix > D)
 Add a density-type property to the scalar field. More...
 
void add_esp (double *v, std::shared_ptr< Matrix > D, const std::vector< double > &nuc_weights=std::vector< double >())
 Add an ESP-type property to the scalar field (total density matrix, must set DF_BASIS_SCF option) More...
 
void add_basis_functions (double **v, const std::vector< int > &indices)
 Add a basis function property for desired indices to the scalar fields in v (rows are basis functions) More...
 
void add_orbitals (double **v, std::shared_ptr< Matrix > C)
 Add orbital property for desired indices to the scalar fields in v (rows are orbitals) More...
 
void add_LOL (double *v, std::shared_ptr< Matrix > D)
 Add a LOL-type property to the scalar field. More...
 
void add_ELF (double *v, std::shared_ptr< Matrix > D)
 Add an ELF-type property to the scalar field. More...
 
void compute_density (std::shared_ptr< Matrix > D, const std::string &name, const std::string &type="CUBE")
 Compute a density-type property and drop a file corresponding to name and type. More...
 
void compute_esp (std::shared_ptr< Matrix > D, const std::vector< double > &nuc_weights, const std::string &name, const std::string &type="CUBE")
 Compute an ESP-type property and drop a file corresponding to name and type. More...
 
void compute_basis_functions (const std::vector< int > &indices, const std::string &name, const std::string &type="CUBE")
 Compute a set of basis function-type properties and drop files corresponding to name, index, and type. More...
 
void compute_orbitals (std::shared_ptr< Matrix > C, const std::vector< int > &indices, const std::vector< std::string > &labels, const std::string &name, const std::string &type="CUBE")
 Compute a set of orbital-type properties and drop files corresponding to name, index, symmetry label, and type. More...
 
void compute_LOL (std::shared_ptr< Matrix > D, const std::string &name, const std::string &type="CUBE")
 Compute a LOL-type property and drop a file corresponding to name and type. More...
 
void compute_ELF (std::shared_ptr< Matrix > D, const std::string &name, const std::string &type="CUBE")
 Compute an ELF-type property and drop a file corresponding to name and type (TODO: this seems very unstable) More...
 

Protected Member Functions

void populate_grid ()
 Setup grid from info in N_, D_, O_. More...
 

Protected Attributes

Optionsoptions_
 Options object for overages and voxel spacing. More...
 
std::shared_ptr< Moleculemol_
 Molecule this grid is built around. More...
 
std::shared_ptr< BasisSetprimary_
 Basis set this grid is built around. More...
 
std::shared_ptr< BasisSetauxiliary_
 The auxiliary basisset for ESP contractions. More...
 
std::string filepath_
 File path for grid storage. More...
 
int * N_
 Voxel quanta in x, y, z [(N_x+1) x (N_y + 1) x (N_z + 1) points]. More...
 
double * D_
 Voxel spacing in x, y, z. More...
 
double * O_
 Voxel origin in x, y, z. More...
 
size_t npoints_
 number of points of grid More...
 
size_t nxyz_
 Sparsity blocking in all cardinal directions. More...
 
double * x_
 x coordinates of grid More...
 
double * y_
 y coordinates of grid More...
 
double * z_
 z coordinates of grid More...
 
double * w_
 w quadrature weights of grid (rectangular) More...
 
std::vector< std::shared_ptr
< BlockOPoints > > 
blocks_
 Vector of blocks. More...
 
std::shared_ptr< BasisExtentsextents_
 Points to basis extents, built internally. More...
 
std::shared_ptr< RKSFunctionspoints_
 RKS points object. More...
 

Constructor & Destructor Documentation

psi::CubicScalarGrid::CubicScalarGrid ( std::shared_ptr< BasisSet primary,
Options options 
)
psi::CubicScalarGrid::~CubicScalarGrid ( )
virtual

Member Function Documentation

void psi::CubicScalarGrid::add_basis_functions ( double **  v,
const std::vector< int > &  indices 
)

Add a basis function property for desired indices to the scalar fields in v (rows are basis functions)

void psi::CubicScalarGrid::add_density ( double *  v,
std::shared_ptr< Matrix D 
)

Add a density-type property to the scalar field.

void psi::CubicScalarGrid::add_ELF ( double *  v,
std::shared_ptr< Matrix D 
)

Add an ELF-type property to the scalar field.

void psi::CubicScalarGrid::add_esp ( double *  v,
std::shared_ptr< Matrix D,
const std::vector< double > &  nuc_weights = std::vector<double>() 
)

Add an ESP-type property to the scalar field (total density matrix, must set DF_BASIS_SCF option)

void psi::CubicScalarGrid::add_LOL ( double *  v,
std::shared_ptr< Matrix D 
)

Add a LOL-type property to the scalar field.

void psi::CubicScalarGrid::add_orbitals ( double **  v,
std::shared_ptr< Matrix C 
)

Add orbital property for desired indices to the scalar fields in v (rows are orbitals)

void psi::CubicScalarGrid::build_grid ( )

Build grid with options overages.

void psi::CubicScalarGrid::build_grid ( const std::string  filepath,
int *  N,
double *  D,
double *  O 
)

Build grid with specified geometry (e.g., from another grid)

void psi::CubicScalarGrid::build_grid ( std::shared_ptr< CubicScalarGrid other)

Build grid from the dimensions in another grid.

void psi::CubicScalarGrid::compute_basis_functions ( const std::vector< int > &  indices,
const std::string &  name,
const std::string &  type = "CUBE" 
)

Compute a set of basis function-type properties and drop files corresponding to name, index, and type.

void psi::CubicScalarGrid::compute_density ( std::shared_ptr< Matrix D,
const std::string &  name,
const std::string &  type = "CUBE" 
)

Compute a density-type property and drop a file corresponding to name and type.

void psi::CubicScalarGrid::compute_ELF ( std::shared_ptr< Matrix D,
const std::string &  name,
const std::string &  type = "CUBE" 
)

Compute an ELF-type property and drop a file corresponding to name and type (TODO: this seems very unstable)

void psi::CubicScalarGrid::compute_esp ( std::shared_ptr< Matrix D,
const std::vector< double > &  nuc_weights,
const std::string &  name,
const std::string &  type = "CUBE" 
)

Compute an ESP-type property and drop a file corresponding to name and type.

void psi::CubicScalarGrid::compute_LOL ( std::shared_ptr< Matrix D,
const std::string &  name,
const std::string &  type = "CUBE" 
)

Compute a LOL-type property and drop a file corresponding to name and type.

void psi::CubicScalarGrid::compute_orbitals ( std::shared_ptr< Matrix C,
const std::vector< int > &  indices,
const std::vector< std::string > &  labels,
const std::string &  name,
const std::string &  type = "CUBE" 
)

Compute a set of orbital-type properties and drop files corresponding to name, index, symmetry label, and type.

double* psi::CubicScalarGrid::D ( ) const
inline

Voxel width in [x,y,z], in bohr.

std::string psi::CubicScalarGrid::filepath ( ) const
inline

Filepath where grid output will be stored.

int* psi::CubicScalarGrid::N ( ) const
inline

Number of voxels in [x,y,z]. Number of points along each dimensions in N_i + 1.

size_t psi::CubicScalarGrid::npoints ( ) const
inline

Total number of points in grid.

size_t psi::CubicScalarGrid::nxyz ( ) const
inline

Number of points.

double* psi::CubicScalarGrid::O ( ) const
inline

Lower-left corner of th grid, in bohr.

void psi::CubicScalarGrid::populate_grid ( )
protected

Setup grid from info in N_, D_, O_.

void psi::CubicScalarGrid::print_header ( )

Header info.

void psi::CubicScalarGrid::set_auxiliary_basis ( std::shared_ptr< BasisSet aux)
inline

Set the auxiliary for ESP if desired.

void psi::CubicScalarGrid::set_filepath ( const std::string  filepath)
inline

Set the directory for cube file storage (defaults to "./")

double* psi::CubicScalarGrid::w ( ) const
inline

w weights (rectangular) in fast ordering

void psi::CubicScalarGrid::write_cube_file ( double *  v,
const std::string &  name 
)

Write a Gaussian cube file of the scalar field v (in fast ordering) to filepath/name.cube.

void psi::CubicScalarGrid::write_gen_file ( double *  v,
const std::string &  name,
const std::string &  type 
)

Write a general file of the scalar field v (in fast ordering) to filepath/name.ext.

double* psi::CubicScalarGrid::x ( ) const
inline

x points in fast ordering

double* psi::CubicScalarGrid::y ( ) const
inline

y points in fast ordering

double* psi::CubicScalarGrid::z ( ) const
inline

z points in fast ordering

Member Data Documentation

std::shared_ptr<BasisSet> psi::CubicScalarGrid::auxiliary_
protected

The auxiliary basisset for ESP contractions.

std::vector<std::shared_ptr<BlockOPoints> > psi::CubicScalarGrid::blocks_
protected

Vector of blocks.

double* psi::CubicScalarGrid::D_
protected

Voxel spacing in x, y, z.

std::shared_ptr<BasisExtents> psi::CubicScalarGrid::extents_
protected

Points to basis extents, built internally.

std::string psi::CubicScalarGrid::filepath_
protected

File path for grid storage.

std::shared_ptr<Molecule> psi::CubicScalarGrid::mol_
protected

Molecule this grid is built around.

int* psi::CubicScalarGrid::N_
protected

Voxel quanta in x, y, z [(N_x+1) x (N_y + 1) x (N_z + 1) points].

size_t psi::CubicScalarGrid::npoints_
protected

number of points of grid

size_t psi::CubicScalarGrid::nxyz_
protected

Sparsity blocking in all cardinal directions.

double* psi::CubicScalarGrid::O_
protected

Voxel origin in x, y, z.

Options& psi::CubicScalarGrid::options_
protected

Options object for overages and voxel spacing.

std::shared_ptr<RKSFunctions> psi::CubicScalarGrid::points_
protected

RKS points object.

std::shared_ptr<BasisSet> psi::CubicScalarGrid::primary_
protected

Basis set this grid is built around.

double* psi::CubicScalarGrid::w_
protected

w quadrature weights of grid (rectangular)

double* psi::CubicScalarGrid::x_
protected

x coordinates of grid

double* psi::CubicScalarGrid::y_
protected

y coordinates of grid

double* psi::CubicScalarGrid::z_
protected

z coordinates of grid


The documentation for this class was generated from the following files: