#include <bader.h>
Public Member Functions | |
Bader (bool verbose=true) | |
Constructor. | |
~Bader () | |
Destructor. | |
void | analyse (const BasisSet &basis, const arma::mat &P, bool neargrid=true, double spacing=0.035, double padding=7.5) |
Fill the grid and run the analysis. | |
arma::ivec | nuclear_regions () const |
Determine nuclear regions. | |
arma::vec | regional_charges () const |
Get charges in the Bader regions. | |
arma::vec | nuclear_charges () const |
Get nuclear charges. | |
void | print_density (double spacing=0.1) const |
Write out electron density. | |
void | print_regions (double spacing=0.1) const |
Write out Bader regions. | |
void | print_individual_regions (double spacing=0.1) const |
Write out individual Bader regions. | |
arma::vec | regional_charges (const BasisSet &basis, const arma::mat &P) const |
Compute Bader charges using existing grid but input density. | |
arma::vec | nuclear_charges (const BasisSet &basis, const arma::mat &P) const |
Get nuclear charges. | |
std::vector< arma::mat > | regional_overlap (const BasisSet &basis) const |
Compute Bader regional overlap matrices. | |
Private Member Functions | |
void | check_regions (std::string msg="") const |
Check that all points have been classified. | |
std::vector< grid_partition_t > | partitioning (double l=1.0) const |
Partition grid into boxes with edge length l. | |
bool | in_cube (const arma::ivec &p) const |
Check that point is in the cube. | |
bool | on_edge (const arma::ivec &p) const |
Is the point on an edge of the cube? | |
bool | neighbors_assigned (const arma::ivec &p) const |
Are the neighbors of the point assigned? nnei gives the maximum displacement to look at. | |
bool | local_maximum (const arma::ivec &p) const |
Is the point a local maximum. | |
double | check_maximum (const arma::ivec &p) const |
Check the strength of the maximum. | |
bool | on_boundary (const arma::ivec &p) const |
Is the point on a Bader region boundary? | |
arma::vec | gradient (const arma::ivec &p) const |
Compute gradient. | |
std::vector< arma::ivec > | classify_ongrid (arma::ivec p) const |
std::vector< arma::ivec > | classify_neargrid (arma::ivec p) const |
void | reorder () |
Reorder regions to nuclear order. | |
void | print_neighbors (const arma::ivec &p) const |
Print neighbors of point. | |
void | analysis_neargrid () |
Perform Bader analysis with the near-grid method. | |
void | analysis_ongrid () |
Perform Bader analysis with the on-grid method. | |
Private Attributes | |
std::vector< nucleus_t > | nuclei |
List of nuclei. | |
arma::mat | nucc |
List of nuclear coordinates. | |
arma::cube | dens |
Density array. | |
arma::icube | region |
Which Bader region the points belong to. | |
arma::sword | Nregions |
Amount of Bader regions. | |
arma::ivec | array_size |
Array size. | |
arma::vec | start |
Starting point of grid. | |
arma::vec | spacing |
Grid spacing. | |
bool | verbose |
Verbose operation? | |
Performs Bader analysis of the electron density.
The routine is based on the article
W. Tang, E. Sanville and G. Henkelman, "A grid-based Bader analysis algorithm without lattice bias", J. Phys.: Condens. Matter 21 (2009) 084204.
|
private |
Run classification on the grid point p with the near-grid method. Returns a list of points on the trajectory.
|
private |
Run classification on the grid point p with the on-grid method. Returns a list of points on the trajectory.