Psi4
Public Member Functions | Protected Attributes | Friends | List of all members
opt::FRAG Class Reference

A group of atoms, its geometry, and its internal coordinates. More...

#include <frag.h>

Inheritance diagram for opt::FRAG:
opt::FB_FRAG

Public Member Functions

 FRAG (int natom_in, double *Z_in, double **geom_in)
 
 FRAG (int natom_in)
 
 ~FRAG ()
 
int g_natom (void) const
 
void set_masses (void)
 
void print_geom (std::string psi_fp, FILE *qc_fp, const int id, bool print_mass=false)
 
void print_geom_grad (std::string psi_fp, FILE *qc_fp, const int id, bool print_mass=false)
 
void print_simples (std::string psi_fp, FILE *qc_fp, int atom_offset=0) const
 
void print_coords (std::string psi_fp, FILE *qc_fp, int atom_offset=0) const
 
void print_combinations (std::string psi_fp, FILE *qc_fp) const
 
void print_intco_dat (std::string psi_fp, FILE *qc_fp, int atom_offset=0) const
 
std::string get_coord_definition (int coord_index, int atom_offset=0)
 
std::string get_simple_definition (int simple_index, int atom_offset=0)
 
INTCO_TYPE get_simple_type (int simple_index)
 
void update_connectivity_by_distances (void)
 
void update_connectivity_by_bonds (void)
 
void print_connectivity (std::string psi_fp, FILE *qc_fp, const int id, const int offset=0) const
 
int add_stre_by_connectivity (void)
 
int add_bend_by_connectivity (void)
 
int add_tors_by_connectivity (void)
 
int add_cartesians (void)
 
int form_trivial_coord_combinations (void)
 
void add_trivial_coord_combination (int simple_id)
 
int form_delocalized_coord_combinations (void)
 
int form_natural_coord_combinations (void)
 
int add_simples_by_connectivity (void)
 
int add_auxiliary_bonds (void)
 
void connect (int i, int j)
 
double ** compute_B (void) const
 
void compute_B (double **B_in, int coord_offset, int atom_offset) const
 
void compute_G (double **, bool use_masses=false) const
 
void compute_derivative_B (GeomType g, int coord_index, double **Bprime, int atom_offset) const
 
void compute_derivative_B (int coord_index, double **Bprime, int atom_offset) const
 
double ** compute_derivative_B (int coord_index) const
 
void print_B (std::string psi_fp, FILE *qc_fp) const
 
void fix_tors_near_180 (void)
 
void fix_oofp_near_180 (void)
 
void fix_bend_axes (void)
 
void unfix_bend_axes (void)
 
int Ncoord (void) const
 
int g_simple_natom (const int coord_index) const
 
int g_simple_atom (const int coord_index, const int atom) const
 
double * g_Z (void) const
 
double * g_Z_pointer (void)
 
void print_s (std::string psi_fp, FILE *qc_fp, GeomType geom) const
 
double * coord_values (void) const
 
double * coord_values (GeomType geom) const
 
double coord_value (int lookup) const
 
double coord_value (GeomType geom, int lookup) const
 
std::vector< int > validate_angles (double const *const dq, int atom_offset)
 
bool present (const SIMPLE_COORDINATE *one) const
 
int find (const SIMPLE_COORDINATE *one) const
 
void displace (double *dq, double *fq, int atom_offset=0)
 
bool displace_util (double *dq, bool focus_on_constraints)
 
double ** g_geom_pointer (void)
 
double ** g_geom (void) const
 
GeomType g_geom_const_pointer (void) const
 
double ** g_grad (void)
 
double ** g_grad_pointer (void)
 
double * g_geom_array (void)
 
double * g_grad_array (void)
 
void set_geom_array (double *geom_array_in)
 
void set_geom (double **geom_in)
 
void set_grad (double **grad_in)
 
void print_geom (std::string psi_fp, FILE *qc_fp)
 
void print_geom_irc (std::string psi_fp, FILE *qc_fp)
 
double ** H_guess (void)
 
double Lindh_rho (int A, int B, double RAB) const
 
double ** Lindh_guess (void)
 
bool ** g_connectivity (void) const
 
const bool *const * g_connectivity_pointer (void) const
 
bool read_coord (std::vector< std::string > &tokens, int first_atom_offset)
 
double ** compute_constraints (void) const
 
int add_hbonds (void)
 
void simple_add (SIMPLE_COORDINATE *i)
 
double g_mass (int i)
 
bool is_frozen (void) const
 
void freeze (void)
 
void unfreeze (void)
 
void freeze_coords (void)
 
double * com (GeomType in_geom)
 
double * com (void)
 
double ** inertia_tensor (GeomType in_geom)
 
double ** inertia_tensor (void)
 
int principal_axes (GeomType geom, double **axes, double *evals)
 
int principal_axes (double **axes, double *evals)
 
bool coord_has_fixed_eq_val (int coord_index) const
 
double coord_fixed_eq_val (int coord_index) const
 
void add_combination_coord (vector< int > ids, vector< double > coeffs)
 
bool apply_frozen_constraints (std::string R_string, std::string B_string, std::string D_string, std::string C_string)
 
bool apply_fixed_constraints (std::string R_string, std::string B_string, std::string D_string)
 
void erase_combo_coord (int index)
 
bool is_noncart_present (void) const
 

Protected Attributes

int natom
 number of atoms in fragment More...
 
double * Z
 atomic numbers More...
 
double ** geom
 cartesian coordinates More...
 
double ** grad
 cartesian coordinates More...
 
double * mass
 nuclear masses More...
 
bool ** connectivity
 connectivity matrix More...
 
bool frozen
 whether to optimize More...
 
COMBO_COORDINATES coords
 simple or linear combinations of simple coordinates More...
 

Friends

class INTERFRAG
 

Detailed Description

A group of atoms, its geometry, and its internal coordinates.

Constructor & Destructor Documentation

opt::FRAG::FRAG ( int  natom_in,
double *  Z_in,
double **  geom_in 
)

Constructor to create fragment.

There is one constructor to insert the atoms, and a different constructor available just to allocate the memory.

Parameters
natom_innumber of atoms.
Z_inatomic charges
geom_inCartesian coordinates (natom_in x 3)
opt::FRAG::FRAG ( int  natom_in)
opt::FRAG::~FRAG ( )

Member Function Documentation

int opt::FRAG::add_auxiliary_bonds ( void  )
int opt::FRAG::add_bend_by_connectivity ( void  )
int opt::FRAG::add_cartesians ( void  )
void opt::FRAG::add_combination_coord ( vector< int >  ids,
vector< double >  coeffs 
)
int opt::FRAG::add_hbonds ( void  )
int opt::FRAG::add_simples_by_connectivity ( void  )
inline
int opt::FRAG::add_stre_by_connectivity ( void  )
int opt::FRAG::add_tors_by_connectivity ( void  )
void opt::FRAG::add_trivial_coord_combination ( int  simple_id)
bool opt::FRAG::apply_fixed_constraints ( std::string  R_string,
std::string  B_string,
std::string  D_string 
)
Parameters
R_stringstring of atom pairs + equilibrium value for fixed distances
B_stringstring of atom triplets + equilibrium value for fixed bends
D_stringstring of atom quartets + equilibrium value for fixed dihedrals
Returns
True if any constraints are present.
bool opt::FRAG::apply_frozen_constraints ( std::string  R_string,
std::string  B_string,
std::string  D_string,
std::string  C_string 
)
Parameters
R_stringstring of atom pairs for frozen distances
B_stringstring of atom triples for frozen bends
D_stringstring of atom quartets for frozen dihedrals
C_stringstring with lists of atom and xyz specification for frozen cartesians
Returns
True if any constraints are present.
double * opt::FRAG::com ( GeomType  in_geom)

Compute center of mass of given geometry

double* opt::FRAG::com ( void  )
inline

Compute center of mass of fragment geometry

double ** opt::FRAG::compute_B ( void  ) const
void opt::FRAG::compute_B ( double **  B_in,
int  coord_offset,
int  atom_offset 
) const
double ** opt::FRAG::compute_constraints ( void  ) const
void opt::FRAG::compute_derivative_B ( GeomType  g,
int  coord_index,
double **  Bprime,
int  atom_offset 
) const
void opt::FRAG::compute_derivative_B ( int  coord_index,
double **  Bprime,
int  atom_offset 
) const
double ** opt::FRAG::compute_derivative_B ( int  coord_index) const
void opt::FRAG::compute_G ( double **  G,
bool  use_masses = false 
) const
void opt::FRAG::connect ( int  i,
int  j 
)
inline
double opt::FRAG::coord_fixed_eq_val ( int  coord_index) const
inline
bool opt::FRAG::coord_has_fixed_eq_val ( int  coord_index) const
inline
double opt::FRAG::coord_value ( int  lookup) const
double opt::FRAG::coord_value ( GeomType  geom,
int  lookup 
) const
double * opt::FRAG::coord_values ( void  ) const
double * opt::FRAG::coord_values ( GeomType  geom) const
void opt::FRAG::displace ( double *  dq,
double *  fq,
int  atom_offset = 0 
)
bool opt::FRAG::displace_util ( double *  dq,
bool  focus_on_constraints 
)
void opt::FRAG::erase_combo_coord ( int  index)
inline
int opt::FRAG::find ( const SIMPLE_COORDINATE one) const
void opt::FRAG::fix_bend_axes ( void  )
void opt::FRAG::fix_oofp_near_180 ( void  )
void opt::FRAG::fix_tors_near_180 ( void  )
int opt::FRAG::form_delocalized_coord_combinations ( void  )
int opt::FRAG::form_natural_coord_combinations ( void  )
int opt::FRAG::form_trivial_coord_combinations ( void  )
void opt::FRAG::freeze ( void  )
inline
void opt::FRAG::freeze_coords ( void  )
bool ** opt::FRAG::g_connectivity ( void  ) const
const bool *const * opt::FRAG::g_connectivity_pointer ( void  ) const
double ** opt::FRAG::g_geom ( void  ) const
double * opt::FRAG::g_geom_array ( void  )
GeomType opt::FRAG::g_geom_const_pointer ( void  ) const
inline
double** opt::FRAG::g_geom_pointer ( void  )
inline
double ** opt::FRAG::g_grad ( void  )
double * opt::FRAG::g_grad_array ( void  )
double** opt::FRAG::g_grad_pointer ( void  )
inline
double opt::FRAG::g_mass ( int  i)
inline
int opt::FRAG::g_natom ( void  ) const
inline

Description

Returns
number of atoms.
int opt::FRAG::g_simple_atom ( const int  coord_index,
const int  atom 
) const
inline
int opt::FRAG::g_simple_natom ( const int  coord_index) const
inline
double * opt::FRAG::g_Z ( void  ) const
double* opt::FRAG::g_Z_pointer ( void  )
inline
std::string opt::FRAG::get_coord_definition ( int  coord_index,
int  atom_offset = 0 
)
std::string opt::FRAG::get_simple_definition ( int  simple_index,
int  atom_offset = 0 
)
INTCO_TYPE opt::FRAG::get_simple_type ( int  simple_index)
double ** opt::FRAG::H_guess ( void  )
double ** opt::FRAG::inertia_tensor ( GeomType  in_geom)

Compute intertia tensor of given geometry

double** opt::FRAG::inertia_tensor ( void  )
inline

Compute intertia tensor of fragment geometry

bool opt::FRAG::is_frozen ( void  ) const
inline
bool opt::FRAG::is_noncart_present ( void  ) const
double ** opt::FRAG::Lindh_guess ( void  )
double opt::FRAG::Lindh_rho ( int  A,
int  B,
double  RAB 
) const
int opt::FRAG::Ncoord ( void  ) const
inline
bool opt::FRAG::present ( const SIMPLE_COORDINATE one) const
int opt::FRAG::principal_axes ( GeomType  geom,
double **  axes,
double *  evals 
)

Compute principal axes of given geometry

int opt::FRAG::principal_axes ( double **  axes,
double *  evals 
)
inline

Compute principal axes of fragment geometry

Parameters
evalsare moments returned in ascending order; zero evals (and evects) are removed.
axesrows are principal axes.
Returns
The number of non-zero principal axes.

We may have to canonically order the degenerate evals later.

void opt::FRAG::print_B ( std::string  psi_fp,
FILE *  qc_fp 
) const
void opt::FRAG::print_combinations ( std::string  psi_fp,
FILE *  qc_fp 
) const
void opt::FRAG::print_connectivity ( std::string  psi_fp,
FILE *  qc_fp,
const int  id,
const int  offset = 0 
) const
void opt::FRAG::print_coords ( std::string  psi_fp,
FILE *  qc_fp,
int  atom_offset = 0 
) const
void opt::FRAG::print_geom ( std::string  psi_fp,
FILE *  qc_fp,
const int  id,
bool  print_mass = false 
)
void opt::FRAG::print_geom ( std::string  psi_fp,
FILE *  qc_fp 
)
void opt::FRAG::print_geom_grad ( std::string  psi_fp,
FILE *  qc_fp,
const int  id,
bool  print_mass = false 
)
void opt::FRAG::print_geom_irc ( std::string  psi_fp,
FILE *  qc_fp 
)
void opt::FRAG::print_intco_dat ( std::string  psi_fp,
FILE *  qc_fp,
int  atom_offset = 0 
) const
void opt::FRAG::print_s ( std::string  psi_fp,
FILE *  qc_fp,
GeomType  geom 
) const
inline
void opt::FRAG::print_simples ( std::string  psi_fp,
FILE *  qc_fp,
int  atom_offset = 0 
) const
bool opt::FRAG::read_coord ( std::vector< std::string > &  tokens,
int  first_atom_offset 
)
void opt::FRAG::set_geom ( double **  geom_in)
void opt::FRAG::set_geom_array ( double *  geom_array_in)
void opt::FRAG::set_grad ( double **  grad_in)
void opt::FRAG::set_masses ( void  )
void opt::FRAG::simple_add ( SIMPLE_COORDINATE i)
inline
void opt::FRAG::unfix_bend_axes ( void  )
void opt::FRAG::unfreeze ( void  )
inline
void opt::FRAG::update_connectivity_by_bonds ( void  )
void opt::FRAG::update_connectivity_by_distances ( void  )
std::vector< int > opt::FRAG::validate_angles ( double const *const  dq,
int  atom_offset 
)

Friends And Related Function Documentation

friend class INTERFRAG
friend

Member Data Documentation

bool** opt::FRAG::connectivity
protected

connectivity matrix

COMBO_COORDINATES opt::FRAG::coords
protected

simple or linear combinations of simple coordinates

bool opt::FRAG::frozen
protected

whether to optimize

double** opt::FRAG::geom
protected

cartesian coordinates

double** opt::FRAG::grad
protected

cartesian coordinates

double* opt::FRAG::mass
protected

nuclear masses

int opt::FRAG::natom
protected

number of atoms in fragment

double* opt::FRAG::Z
protected

atomic numbers


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