Psi4
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
psi::Molecule Class Reference

Molecule information class. More...

#include <molecule.h>

Public Types

enum  GeometryFormat { ZMatrix, Cartesian }
 
enum  GeometryUnits { Angstrom, Bohr }
 
enum  FragmentType { Absent, Real, Ghost }
 
enum  FragmentLevel { QMatom = 1, EFPatom = 2, ALLatom = 3 }
 
typedef std::vector
< std::shared_ptr< CoordEntry > > 
EntryVector
 
typedef EntryVector::iterator EntryVectorIter
 

Public Member Functions

 Molecule ()
 
 Molecule (const Molecule &other)
 Copy constructor. More...
 
virtual ~Molecule ()
 
Molecule clone (void)
 
void init_with_xyz (const std::string &xyzfilename)
 
void add_atom (int Z, double x, double y, double z, std::string sym="", double mass=0.0, double charge=0.0)
 
bool multiplicity_specified () const
 Whether the multiplicity was given by the user. More...
 
bool charge_specified () const
 Whether the charge was given by the user. More...
 
int nfragments () const
 The number of fragments in the molecule. More...
 
int nactive_fragments ()
 The number of active fragments in the molecule. More...
 
std::pair< int, int > fragment_atom_pair (int f)
 Returns the list of atoms belonging to a fragment. More...
 
const std::string name () const
 Get molecule name. More...
 
const std::string & basis_on_atom (int atom) const
 Returns the name of the basis set on the specified atom. More...
 
void set_name (const std::string &_name)
 Set molecule name. More...
 
int natom () const
 Number of atoms. More...
 
int nallatom () const
 Number of all atoms (includes dummies) More...
 
const double & Z (int atom) const
 Nuclear charge of atom. More...
 
double fZ (int atom) const
 Nuclear charge of atom. More...
 
double x (int atom) const
 x position of atom More...
 
double y (int atom) const
 y position of atom More...
 
double z (int atom) const
 z position of atom More...
 
double fx (int atom) const
 x position of atom More...
 
double fy (int atom) const
 y position of atom More...
 
double fz (int atom) const
 z position of atom More...
 
Vector3 xyz (int atom) const
 Returns a Vector3 with x, y, z position of atom. More...
 
Vector3 fxyz (int atom) const
 
double xyz (int atom, int _xyz) const
 Returns x, y, or z component of 'atom'. More...
 
double mass (int atom) const
 Returns mass atom atom. More...
 
void set_mass (int atom, double mass)
 Set the mass of a particular atom (good for isotopic substitutions) More...
 
void set_nuclear_charge (int atom, double newZ)
 Set the nuclear charge of an atom (primarily used in ECP calculations). More...
 
std::string symbol (int atom) const
 Returns the cleaned up label of the atom (C2 => C, H4 = H) More...
 
std::string fsymbol (int atom) const
 Returns the cleaned up label of the atom (C2 => C, H4 = H) More...
 
std::string label (int atom) const
 Returns the original label of the atom as given in the input file (C2, H4). More...
 
double charge (int atom) const
 Returns charge of atom. More...
 
int true_atomic_number (int atom) const
 Returns the true atomic number of an atom. More...
 
int ftrue_atomic_number (int atom) const
 
double fmass (int atom) const
 Returns mass atom atom. More...
 
std::string flabel (int atom) const
 Returns label of atom. More...
 
double fcharge (int atom) const
 Returns charge of atom. More...
 
const std::shared_ptr
< CoordEntry > & 
atom_entry (int atom) const
 Returns the CoordEntry for an atom. More...
 
void set_basis_all_atoms (const std::string &name, const std::string &type="BASIS")
 
void set_basis_by_symbol (const std::string &symbol, const std::string &name, const std::string &type="BASIS")
 
void set_basis_by_number (int number, const std::string &name, const std::string &type="BASIS")
 
void set_basis_by_label (const std::string &label, const std::string &name, const std::string &type="BASIS")
 
void set_shell_by_label (const std::string &label, const std::string &name, const std::string &type="BASIS")
 
void set_reinterpret_coordentry (bool rc)
 Do we reinterpret coordentries during a call to update_geometry? More...
 
Matrix geometry () const
 Returns the geometry in a Matrix. More...
 
Matrix full_geometry () const
 Returns the full (dummies included) in a Matrix. More...
 
void set_geometry (double **geom)
 
void set_geometry (const Matrix &geom)
 
void set_full_geometry (double **geom)
 
void set_full_geometry (const Matrix &geom)
 
void rotate (const Matrix &R)
 
void rotate_full (const Matrix &R)
 
void reinterpret_coordentries ()
 
void reinterpret_fragments ()
 
void symmetrize_to_abelian_group (double tol)
 
Vector3 center_of_mass () const
 Computes center of mass of molecule (does not translate molecule) More...
 
double nuclear_repulsion_energy () const
 Computes nuclear repulsion energy. More...
 
Vector3 nuclear_dipole () const
 The dipole generated by the nuclear charges evaluated at the origin. More...
 
Vector3 nuclear_dipole (const Vector3 &origin) const
 The dipole generated by the nuclear charges evaluated using a given origin. More...
 
Matrix nuclear_repulsion_energy_deriv1 () const
 Computes nuclear repulsion energy derivatives. More...
 
Matrix nuclear_repulsion_energy_deriv2 () const
 Computes nuclear repulsion energy second derivatives. More...
 
double pairwise_nuclear_repulsion_energy (std::shared_ptr< Molecule > other) const
 Computes the nuclear repuslion energy between this and another Molecule. More...
 
void translate (const Vector3 &r)
 Translates molecule by r. More...
 
void move_to_com ()
 Moves molecule to center of mass. More...
 
Matrix distance_matrix () const
 Computes and returns a matrix depicting distances between atoms. More...
 
Matrixinertia_tensor () const
 Compute inertia tensor. More...
 
Vector rotational_constants (double tol=FULL_PG_TOL) const
 Compute the rotational constants and return them in wavenumbers. More...
 
void print_rotational_constants (void) const
 Print the rotational constants. More...
 
RotorType rotor_type (double tol=FULL_PG_TOL) const
 Return the rotor type. More...
 
void print () const
 Print the molecule. More...
 
void print_cluster () const
 Print the molecule, adding spacers. More...
 
void print_full () const
 Print full atom list. More...
 
void print_in_input_format () const
 Print the molecule in the same format that the user provided. More...
 
void print_in_bohr () const
 Print the molecule in Bohr. More...
 
void print_in_angstrom () const
 Print the molecule in Angstrom. More...
 
void print_distances () const
 Print the geometrical parameters of the molecule. More...
 
void print_bond_angles () const
 
void print_dihedrals () const
 
void print_out_of_planes () const
 
void save_xyz_file (const std::string &filename, bool save_ghosts=true) const
 Save an XYZ file. More...
 
std::string save_string_xyz_file () const
 Save an XYZ file to a string. More...
 
std::string save_string_xyz () const
 Save an XYZ string. More...
 
std::string create_psi4_string_from_molecule () const
 
void activate_all_fragments ()
 
void deactivate_all_fragments ()
 
void set_active_fragments (std::vector< int > reals)
 
void set_active_fragment (int fragment)
 
void set_ghost_fragments (std::vector< int > ghosts)
 
void set_ghost_fragment (int fragment)
 
std::shared_ptr< Moleculeextract_subsets (const std::vector< int > &real_list, const std::vector< int > &ghost_list) const
 
std::shared_ptr< Moleculepy_extract_subsets_1 (std::vector< int > reals, std::vector< int > ghost)
 
std::shared_ptr< Moleculepy_extract_subsets_2 (std::vector< int > reals, int ghost=-1)
 
std::shared_ptr< Moleculepy_extract_subsets_3 (int reals, std::vector< int > ghost)
 
std::shared_ptr< Moleculepy_extract_subsets_4 (int reals, int ghost=-1)
 
std::shared_ptr< Moleculepy_extract_subsets_5 (std::vector< int > reals)
 
std::shared_ptr< Moleculepy_extract_subsets_6 (int reals)
 
const std::vector< std::pair
< int, int > > & 
fragments () const
 
const std::vector< FragmentType > & fragment_types () const
 A list describing how to handle each fragment. More...
 
const std::vector< int > & fragment_charges () const
 The charge of each fragment. More...
 
const std::vector< int > & fragment_multiplicities () const
 The multiplicity of each fragment. More...
 
void set_has_cartesian (bool tf)
 Sets whether this molecule contains at least one cartesian entry. More...
 
void set_has_zmatrix (bool tf)
 Sets whether this molecule contains at least one zmatrix entry. More...
 
bool has_zmatrix () const
 Whether this molecule has at least one zmatrix entry. More...
 
void set_variable (const std::string &str, double val)
 
double get_variable (const std::string &str)
 
bool is_variable (const std::string &str) const
 
void set_molecular_charge (int charge)
 Sets the molecular charge. More...
 
int molecular_charge () const
 Gets the molecular charge. More...
 
void set_multiplicity (int mult)
 Sets the multiplicity (defined as 2Ms + 1) More...
 
int multiplicity () const
 Get the multiplicity (defined as 2Ms + 1) More...
 
void set_units (GeometryUnits units)
 Sets the geometry units. More...
 
GeometryUnits units () const
 Gets the geometry units. More...
 
bool orientation_fixed () const
 Get whether or not orientation is fixed. More...
 
void set_orientation_fixed (bool fix=true)
 Fix the orientation at its current frame. More...
 
void set_com_fixed (bool fix=true)
 Fix the center of mass at its current frame. More...
 
std::string schoenflies_symbol () const
 Returns the Schoenflies symbol. More...
 
bool valid_atom_map (double tol=0.05) const
 Check if current geometry fits current point group. More...
 
std::string full_point_group () const
 Return point group name such as C3v or S8. More...
 
std::string full_point_group_with_n () const
 Return point group name such as Cnv or Sn. More...
 
int full_pg_n ()
 Return n in Cnv, etc.; If there is no n (e.g. Td) it's the highest-order rotation axis. More...
 
void update_geometry ()
 
Moleculeoperator= (const Molecule &other)
 
Molecule operator+ (const Molecule &other)
 Addition. More...
 
Molecule operator- (const Molecule &other)
 Subtraction. More...
 
void operator+= (const Molecule &other)
 Plus equals. More...
 
int atom_at_position1 (double *, double tol=0.05) const
 
int atom_at_position2 (Vector3 &, double tol=0.05) const
 
int nunique () const
 
int unique (int iuniq) const
 Returns the overall number of the iuniq'th unique atom. More...
 
int nequivalent (int iuniq) const
 Returns the number of atoms equivalent to iuniq. More...
 
int equivalent (int iuniq, int j) const
 Returns the j'th atom equivalent to iuniq. More...
 
int atom_to_unique (int iatom) const
 
int atom_to_unique_offset (int iatom) const
 
int max_nequivalent () const
 
bool has_symmetry_element (Vector3 &op, double tol=DEFAULT_SYM_TOL) const
 
std::shared_ptr< PointGrouppoint_group () const
 
void set_point_group (std::shared_ptr< PointGroup > pg)
 
void set_full_point_group (double tol=FULL_PG_TOL)
 Determine and set FULL point group. More...
 
bool has_inversion (Vector3 &origin, double tol=DEFAULT_SYM_TOL) const
 Does the molecule have an inversion center at origin. More...
 
bool is_plane (Vector3 &origin, Vector3 &uperp, double tol=DEFAULT_SYM_TOL) const
 Is a plane? More...
 
bool is_axis (Vector3 &origin, Vector3 &axis, int order, double tol=DEFAULT_SYM_TOL) const
 Is an axis? More...
 
void is_linear_planar (bool &linear, bool &planar, double tol=DEFAULT_SYM_TOL) const
 Is the molecule linear, or planar? More...
 
std::shared_ptr< PointGroupfind_point_group (double tol=DEFAULT_SYM_TOL) const
 Find computational molecular point group, user can override this with the "symmetry" keyword. More...
 
void reset_point_group (const std::string &pgname)
 Override symmetry from outside the molecule string. More...
 
std::shared_ptr< PointGroupfind_highest_point_group (double tol=DEFAULT_SYM_TOL) const
 Find highest molecular point group. More...
 
std::shared_ptr< Matrixsymmetry_frame (double tol=DEFAULT_SYM_TOL)
 
void release_symmetry_information ()
 Release symmetry information. More...
 
void form_symmetry_information (double tol=DEFAULT_SYM_TOL)
 
std::string sym_label ()
 Returns the symmetry label. More...
 
std::vector< std::string > irrep_labels ()
 Returns the irrep labels. More...
 
const std::string & symmetry_from_input () const
 
void symmetrize (double tol=0.05, bool suppress_mol_print_in_exc=false)
 

Static Public Member Functions

static std::shared_ptr< Moleculecreate_molecule_from_string (const std::string &geom)
 

Public Attributes

std::vector< std::pair< int,
int > > 
fragments_
 The list of atom ranges defining each fragment from parent molecule. More...
 

Protected Member Functions

void clear ()
 Zero it out. More...
 
CoordValueget_coord_value (const std::string &str)
 
int get_anchor_atom (const std::string &str, const std::string &line)
 

Protected Attributes

std::string name_
 Molecule (or fragment) name. More...
 
EntryVector atoms_
 Atom info vector (no knowledge of dummy atoms) More...
 
EntryVector full_atoms_
 Atom info vector (includes dummy atoms) More...
 
std::vector< int > fragment_charges_
 The charge of each fragment. More...
 
std::vector< int > fragment_multiplicities_
 The multiplicity of each fragment. More...
 
bool fix_orientation_
 Reorient or not? More...
 
bool move_to_com_
 Move to center of mass or not? More...
 
bool charge_specified_
 Whether the charge was given by the user. More...
 
bool multiplicity_specified_
 Whether the multiplicity was specified by the user. More...
 
int molecular_charge_
 The molecular charge. More...
 
int multiplicity_
 The multiplicity (defined as 2Ms + 1) More...
 
GeometryUnits units_
 The units used to define the geometry. More...
 
double input_units_to_au_
 The conversion factor to take input units to Bohr. More...
 
std::vector< std::string > all_variables_
 A list of all variables known, whether they have been set or not. More...
 
std::shared_ptr< PointGrouppg_
 Point group to use with this molecule. More...
 
FullPointGroup full_pg_
 Full point group. More...
 
int full_pg_n_
 n of the highest rotational axis Cn More...
 
int nunique_
 Number of unique atoms. More...
 
int * nequiv_
 Number of equivalent atoms per unique atom (length nunique_) More...
 
int ** equiv_
 Equivalent atom mapping array. More...
 
int * atom_to_unique_
 Atom to unique atom mapping array (length natom) More...
 
std::map< std::string, double > geometry_variables_
 A listing of the variables used to define the geometries. More...
 
std::vector< FragmentTypefragment_types_
 A list describing how to handle each fragment. More...
 
std::string symmetry_from_input_
 Symmetry string from geometry specification. More...
 
bool reinterpret_coordentries_
 
bool lock_frame_
 Nilpotence boolean (flagged upon first determination of symmetry frame, reset each time a substantiative change is made) More...
 
bool zmat_
 Whether this molecule has at least one zmatrix entry. More...
 
bool cart_
 Whether this molecule has at least one cartesian entry. More...
 

Detailed Description

Molecule information class.

Member Typedef Documentation

typedef std::vector<std::shared_ptr<CoordEntry> > psi::Molecule::EntryVector
typedef EntryVector::iterator psi::Molecule::EntryVectorIter

Member Enumeration Documentation

Enumerator
QMatom 

Quantum mechanical

EFPatom 

Effective fragment potential

ALLatom 

All atom types

How to handle each fragment

Enumerator
Absent 

Neglect completely

Real 

Include, as normal

Ghost 

Include, but with ghost atoms

The type of geometry provided in the input

Enumerator
ZMatrix 

Z-matrix coordinates

Cartesian 

Cartesian coordinates

The Units used to define the geometry

Enumerator
Angstrom 
Bohr 

Constructor & Destructor Documentation

psi::Molecule::Molecule ( )
psi::Molecule::Molecule ( const Molecule other)

Copy constructor.

psi::Molecule::~Molecule ( )
virtual

Member Function Documentation

void psi::Molecule::activate_all_fragments ( )

Sets all fragments in the molecule to be active.

void psi::Molecule::add_atom ( int  Z,
double  x,
double  y,
double  z,
std::string  sym = "",
double  mass = 0.0,
double  charge = 0.0 
)

Add an atom to the molecule

Parameters
Zatomic number
xcartesian coordinate
ycartesian coordinate
zcartesian coordinate
symbatomic symbol to use
massmass to use if non standard
chargecharge to use if non standard
linenoline number when taken from a string
int psi::Molecule::atom_at_position1 ( double *  coord,
double  tol = 0.05 
) const

Tests to see of an atom is at the passed position with a given tolerance

int psi::Molecule::atom_at_position2 ( Vector3 b,
double  tol = 0.05 
) const
const std::shared_ptr< CoordEntry > & psi::Molecule::atom_entry ( int  atom) const

Returns the CoordEntry for an atom.

int psi::Molecule::atom_to_unique ( int  iatom) const
inline

Converts an atom number to the number of its generating unique atom. The return value is in [0, nunique).

int psi::Molecule::atom_to_unique_offset ( int  iatom) const

Converts an atom number to the offset of this atom in the list of generated atoms. The unique atom itself is allowed offset 0.

const std::string & psi::Molecule::basis_on_atom ( int  atom) const

Returns the name of the basis set on the specified atom.

Vector3 psi::Molecule::center_of_mass ( ) const

Computes center of mass of molecule (does not translate molecule)

double psi::Molecule::charge ( int  atom) const

Returns charge of atom.

bool psi::Molecule::charge_specified ( ) const
inline

Whether the charge was given by the user.

void psi::Molecule::clear ( )
protected

Zero it out.

Molecule psi::Molecule::clone ( void  )
inline
std::shared_ptr< Molecule > psi::Molecule::create_molecule_from_string ( const std::string &  geom)
static

Given a string (including newlines to separate lines), builds a new molecule and wraps it in a smart pointer

Parameters
geoma string providing the user's input
std::string psi::Molecule::create_psi4_string_from_molecule ( ) const

Regenerates a input file molecule specification string from the current state of the Molecule. Contains Cartesian geometry info, fragmentation, charges and multiplicities, and any frame restriction.

void psi::Molecule::deactivate_all_fragments ( )

Sets all fragments in the molecule to be inactive.

Matrix psi::Molecule::distance_matrix ( ) const

Computes and returns a matrix depicting distances between atoms.

Reorient molecule to standard frame. See input/reorient.cc If you want the molecule to be reoriented about the center of mass make sure you call move_to_com() prior to calling reorient()

int psi::Molecule::equivalent ( int  iuniq,
int  j 
) const
inline

Returns the j'th atom equivalent to iuniq.

std::shared_ptr< Molecule > psi::Molecule::extract_subsets ( const std::vector< int > &  real_list,
const std::vector< int > &  ghost_list 
) const

Makes a copy of the molecule, returning a new ref counted molecule with only certain fragment atoms present as either ghost or real atoms

Parameters
real_listThe list of fragments that should be present in the molecule as real atoms.
ghost_listThe list of fragments that should be present in the molecule as ghosts.
Returns
The ref counted cloned molecule
double psi::Molecule::fcharge ( int  atom) const

Returns charge of atom.

std::shared_ptr< PointGroup > psi::Molecule::find_highest_point_group ( double  tol = DEFAULT_SYM_TOL) const

Find highest molecular point group.

std::shared_ptr< PointGroup > psi::Molecule::find_point_group ( double  tol = DEFAULT_SYM_TOL) const

Find computational molecular point group, user can override this with the "symmetry" keyword.

std::string psi::Molecule::flabel ( int  atom) const

Returns label of atom.

double psi::Molecule::fmass ( int  atom) const

Returns mass atom atom.

void psi::Molecule::form_symmetry_information ( double  tol = DEFAULT_SYM_TOL)

Initialize molecular specific symemtry information Uses the point group object obtain by calling point_group()

std::pair<int, int> psi::Molecule::fragment_atom_pair ( int  f)
inline

Returns the list of atoms belonging to a fragment.

const std::vector<int>& psi::Molecule::fragment_charges ( ) const
inline

The charge of each fragment.

const std::vector<int>& psi::Molecule::fragment_multiplicities ( ) const
inline

The multiplicity of each fragment.

const std::vector<FragmentType>& psi::Molecule::fragment_types ( ) const
inline

A list describing how to handle each fragment.

const std::vector<std::pair<int, int> >& psi::Molecule::fragments ( ) const
inline

The list of atom ranges defining each fragment from parent molecule (fragments[frag_ind] = <Afirst,Alast+1>)

std::string psi::Molecule::fsymbol ( int  atom) const

Returns the cleaned up label of the atom (C2 => C, H4 = H)

int psi::Molecule::ftrue_atomic_number ( int  atom) const
Matrix psi::Molecule::full_geometry ( ) const

Returns the full (dummies included) in a Matrix.

int psi::Molecule::full_pg_n ( )
inline

Return n in Cnv, etc.; If there is no n (e.g. Td) it's the highest-order rotation axis.

std::string psi::Molecule::full_point_group ( ) const

Return point group name such as C3v or S8.

std::string psi::Molecule::full_point_group_with_n ( ) const
inline

Return point group name such as Cnv or Sn.

double psi::Molecule::fx ( int  atom) const

x position of atom

Vector3 psi::Molecule::fxyz ( int  atom) const
double psi::Molecule::fy ( int  atom) const

y position of atom

double psi::Molecule::fZ ( int  atom) const

Nuclear charge of atom.

double psi::Molecule::fz ( int  atom) const

z position of atom

Matrix psi::Molecule::geometry ( ) const

Returns the geometry in a Matrix.

int psi::Molecule::get_anchor_atom ( const std::string &  str,
const std::string &  line 
)
protected

Attempts to interpret a string as an atom specifier in a zmatrix.

Parameters
strthe string to interpret.
linethe current line, for error message printing.
Returns
the atom number (adjusted to zero-based counting)
CoordValue * psi::Molecule::get_coord_value ( const std::string &  str)
protected

Attempts to interpret a string as a double, if not it assumes it's a variable.

Parameters
strthe string to interpret.
Returns
the CoordValue interpretation of the string.
double psi::Molecule::get_variable ( const std::string &  str)

Checks to see if the variable str is in the list, sets it to val and returns true if it is, and returns false if not.

bool psi::Molecule::has_inversion ( Vector3 origin,
double  tol = DEFAULT_SYM_TOL 
) const

Does the molecule have an inversion center at origin.

bool psi::Molecule::has_symmetry_element ( Vector3 op,
double  tol = DEFAULT_SYM_TOL 
) const

Symmetry

bool psi::Molecule::has_zmatrix ( ) const
inline

Whether this molecule has at least one zmatrix entry.

Matrix * psi::Molecule::inertia_tensor ( ) const

Compute inertia tensor.

void psi::Molecule::init_with_xyz ( const std::string &  xyzfilename)

Pull information from an XYZ file. Useful for debugging.

Parameters
xyzfilenameFilename of xyz file.
std::vector< std::string > psi::Molecule::irrep_labels ( )

Returns the irrep labels.

bool psi::Molecule::is_axis ( Vector3 origin,
Vector3 axis,
int  order,
double  tol = DEFAULT_SYM_TOL 
) const

Is an axis?

void psi::Molecule::is_linear_planar ( bool &  linear,
bool &  planar,
double  tol = DEFAULT_SYM_TOL 
) const

Is the molecule linear, or planar?

bool psi::Molecule::is_plane ( Vector3 origin,
Vector3 uperp,
double  tol = DEFAULT_SYM_TOL 
) const

Is a plane?

bool psi::Molecule::is_variable ( const std::string &  str) const

Checks to see if the variable str is in the list, returns true if it is, and returns false if not.

std::string psi::Molecule::label ( int  atom) const

Returns the original label of the atom as given in the input file (C2, H4).

double psi::Molecule::mass ( int  atom) const

Returns mass atom atom.

int psi::Molecule::max_nequivalent ( ) const

Returns the maximum number of equivalent atoms.

int psi::Molecule::molecular_charge ( ) const

Gets the molecular charge.

Checks whether the user has specified the charge in the options, and returns the appropriate value.

Returns
The charge from the options keywords, if specified. If not, the value passed to the molecule specification, which takes the default value provided by liboptions if not specified.
void psi::Molecule::move_to_com ( )

Moves molecule to center of mass.

int psi::Molecule::multiplicity ( ) const

Get the multiplicity (defined as 2Ms + 1)

Checks whether the user has specified the multiplicity in the options, and returns the appropriate value.

Returns
The multiplicity from the options keywords, if specified. If not, the value passed to the molecule specification, which takes the default value provided by liboptions if not specified.
bool psi::Molecule::multiplicity_specified ( ) const
inline

Whether the multiplicity was given by the user.

int psi::Molecule::nactive_fragments ( )

The number of active fragments in the molecule.

int psi::Molecule::nallatom ( ) const
inline

Number of all atoms (includes dummies)

const std::string psi::Molecule::name ( ) const
inline

Get molecule name.

int psi::Molecule::natom ( ) const

Number of atoms.

int psi::Molecule::nequivalent ( int  iuniq) const
inline

Returns the number of atoms equivalent to iuniq.

int psi::Molecule::nfragments ( ) const
inline

The number of fragments in the molecule.

Vector3 psi::Molecule::nuclear_dipole ( ) const

The dipole generated by the nuclear charges evaluated at the origin.

Vector3 psi::Molecule::nuclear_dipole ( const Vector3 origin) const

The dipole generated by the nuclear charges evaluated using a given origin.

double psi::Molecule::nuclear_repulsion_energy ( ) const

Computes nuclear repulsion energy.

Matrix psi::Molecule::nuclear_repulsion_energy_deriv1 ( ) const

Computes nuclear repulsion energy derivatives.

Matrix psi::Molecule::nuclear_repulsion_energy_deriv2 ( ) const

Computes nuclear repulsion energy second derivatives.

int psi::Molecule::nunique ( ) const
inline

Unique details These routines assume the molecular point group has been determined.

Return the number of unique atoms.

Molecule psi::Molecule::operator+ ( const Molecule other)

Addition.

void psi::Molecule::operator+= ( const Molecule other)

Plus equals.

Addition.

Plus equals

Molecule psi::Molecule::operator- ( const Molecule other)

Subtraction.

Molecule & psi::Molecule::operator= ( const Molecule other)

Operators Assignment operator.

bool psi::Molecule::orientation_fixed ( ) const
inline

Get whether or not orientation is fixed.

double psi::Molecule::pairwise_nuclear_repulsion_energy ( std::shared_ptr< Molecule other) const

Computes the nuclear repuslion energy between this and another Molecule.

std::shared_ptr< PointGroup > psi::Molecule::point_group ( ) const
void psi::Molecule::print ( void  ) const

Print the molecule.

void psi::Molecule::print_bond_angles ( ) const
void psi::Molecule::print_cluster ( ) const

Print the molecule, adding spacers.

void psi::Molecule::print_dihedrals ( ) const
void psi::Molecule::print_distances ( ) const

Print the geometrical parameters of the molecule.

void psi::Molecule::print_full ( ) const

Print full atom list.

void psi::Molecule::print_in_angstrom ( ) const

Print the molecule in Angstrom.

void psi::Molecule::print_in_bohr ( ) const

Print the molecule in Bohr.

void psi::Molecule::print_in_input_format ( ) const

Print the molecule in the same format that the user provided.

void psi::Molecule::print_out_of_planes ( ) const
void psi::Molecule::print_rotational_constants ( void  ) const

Print the rotational constants.

std::shared_ptr< Molecule > psi::Molecule::py_extract_subsets_1 ( std::vector< int >  reals,
std::vector< int >  ghost 
)

A wrapper to extract_subsets, callable from Boost

Parameters
realsA list containing the real atoms.
ghostA list containing the ghost atoms.
Returns
The ref counted cloned molecule.
std::shared_ptr< Molecule > psi::Molecule::py_extract_subsets_2 ( std::vector< int >  reals,
int  ghost = -1 
)

A wrapper to extract_subsets, callable from Boost

Parameters
realsA list containing the real atoms.
ghostAn int containing the ghost atoms.
Returns
The ref counted cloned molecule.
std::shared_ptr< Molecule > psi::Molecule::py_extract_subsets_3 ( int  reals,
std::vector< int >  ghost 
)

A wrapper to extract_subsets, callable from Boost

Parameters
realsAn int containing the real atoms.
ghostA list containing the ghost atoms.
Returns
The ref counted cloned molecule.
std::shared_ptr< Molecule > psi::Molecule::py_extract_subsets_4 ( int  reals,
int  ghost = -1 
)

A wrapper to extract_subsets, callable from Boost

Parameters
realsAn int containing the real atoms.
ghostAn int containing the ghost atoms.
Returns
The ref counted cloned molecule.
std::shared_ptr< Molecule > psi::Molecule::py_extract_subsets_5 ( std::vector< int >  reals)

A wrapper to extract_subsets, callable from Boost

Parameters
realsA list containing the real atoms.
Returns
The ref counted cloned molecule.
std::shared_ptr< Molecule > psi::Molecule::py_extract_subsets_6 ( int  reals)

A wrapper to extract_subsets, callable from Boost

Parameters
realsAn int containing the real atoms.
Returns
The ref counted cloned molecule.
void psi::Molecule::reinterpret_coordentries ( )

Reinterpret the fragments for reals/ghosts and build the atom list

void psi::Molecule::reinterpret_fragments ( )

Reinterpret the fragments for QM/EFP and build the atom list

void psi::Molecule::release_symmetry_information ( )

Release symmetry information.

void psi::Molecule::reset_point_group ( const std::string &  pgname)

Override symmetry from outside the molecule string.

void psi::Molecule::rotate ( const Matrix R)

Rotates the molecule using rotation matrix R

void psi::Molecule::rotate_full ( const Matrix R)
Vector psi::Molecule::rotational_constants ( double  tol = FULL_PG_TOL) const

Compute the rotational constants and return them in wavenumbers.

RotorType psi::Molecule::rotor_type ( double  tol = FULL_PG_TOL) const

Return the rotor type.

std::string psi::Molecule::save_string_xyz ( ) const

Save an XYZ string.

std::string psi::Molecule::save_string_xyz_file ( ) const

Save an XYZ file to a string.

void psi::Molecule::save_xyz_file ( const std::string &  filename,
bool  save_ghosts = true 
) const

Save an XYZ file.

std::string psi::Molecule::schoenflies_symbol ( ) const

Returns the Schoenflies symbol.

void psi::Molecule::set_active_fragment ( int  fragment)

Sets the specified fragment to be real.

Parameters
fragmentThe fragment to set.
void psi::Molecule::set_active_fragments ( std::vector< int >  reals)

Sets the specified list of fragments to be real.

Parameters
realsThe list of real fragments.
void psi::Molecule::set_basis_all_atoms ( const std::string &  name,
const std::string &  type = "BASIS" 
)
void psi::Molecule::set_basis_by_label ( const std::string &  label,
const std::string &  name,
const std::string &  type = "BASIS" 
)
void psi::Molecule::set_basis_by_number ( int  number,
const std::string &  name,
const std::string &  type = "BASIS" 
)
void psi::Molecule::set_basis_by_symbol ( const std::string &  symbol,
const std::string &  name,
const std::string &  type = "BASIS" 
)
void psi::Molecule::set_com_fixed ( bool  fix = true)
inline

Fix the center of mass at its current frame.

void psi::Molecule::set_full_geometry ( double **  geom)

Sets the full geometry, given a matrix of coordinates (in Bohr).

void psi::Molecule::set_full_geometry ( const Matrix geom)

Sets the full geometry, given a Matrix of coordinates (in Bohr).

void psi::Molecule::set_full_point_group ( double  tol = FULL_PG_TOL)

Determine and set FULL point group.

void psi::Molecule::set_geometry ( double **  geom)

Sets the geometry, given a matrix of coordinates (in Bohr).

Parameters
geomgeometry matrix of dimension natom X 3
void psi::Molecule::set_geometry ( const Matrix geom)

Sets the geometry, given a Matrix of coordinates (in Bohr).

void psi::Molecule::set_ghost_fragment ( int  fragment)

Sets the specified fragment to be a ghost.

Parameters
fragmentThe fragment to set.
void psi::Molecule::set_ghost_fragments ( std::vector< int >  ghosts)

Sets the specified list of fragments to be ghosts.

Parameters
ghostsThe list of ghosts fragments.
void psi::Molecule::set_has_cartesian ( bool  tf)
inline

Sets whether this molecule contains at least one cartesian entry.

void psi::Molecule::set_has_zmatrix ( bool  tf)
inline

Sets whether this molecule contains at least one zmatrix entry.

void psi::Molecule::set_mass ( int  atom,
double  mass 
)
inline

Set the mass of a particular atom (good for isotopic substitutions)

void psi::Molecule::set_molecular_charge ( int  charge)
inline

Sets the molecular charge.

void psi::Molecule::set_multiplicity ( int  mult)
inline

Sets the multiplicity (defined as 2Ms + 1)

void psi::Molecule::set_name ( const std::string &  _name)
inline

Set molecule name.

void psi::Molecule::set_nuclear_charge ( int  atom,
double  newZ 
)

Set the nuclear charge of an atom (primarily used in ECP calculations).

void psi::Molecule::set_orientation_fixed ( bool  fix = true)
inline

Fix the orientation at its current frame.

void psi::Molecule::set_point_group ( std::shared_ptr< PointGroup pg)
void psi::Molecule::set_reinterpret_coordentry ( bool  rc)

Do we reinterpret coordentries during a call to update_geometry?

void psi::Molecule::set_shell_by_label ( const std::string &  label,
const std::string &  name,
const std::string &  type = "BASIS" 
)
void psi::Molecule::set_units ( GeometryUnits  units)
inline

Sets the geometry units.

void psi::Molecule::set_variable ( const std::string &  str,
double  val 
)

Assigns the value val to the variable labelled string in the list of geometry variables. Also calls update_geometry()

std::string psi::Molecule::sym_label ( )

Returns the symmetry label.

std::string psi::Molecule::symbol ( int  atom) const

Returns the cleaned up label of the atom (C2 => C, H4 = H)

void psi::Molecule::symmetrize ( double  tol = 0.05,
bool  suppress_mol_print_in_exc = false 
)

Force the molecule to have the symmetry specified in pg_. This is to handle noise coming in from optking.

void psi::Molecule::symmetrize_to_abelian_group ( double  tol)

Find the nearest point group within the tolerance specified, and adjust the coordinates to have that symmetry.

std::shared_ptr< Matrix > psi::Molecule::symmetry_frame ( double  tol = DEFAULT_SYM_TOL)

Determine symmetry reference frame. If noreorient is set, this is the rotation matrix applied to the geometry in update_geometry.

const std::string& psi::Molecule::symmetry_from_input ( ) const
inline
void psi::Molecule::translate ( const Vector3 r)

Translates molecule by r.

int psi::Molecule::true_atomic_number ( int  atom) const

Returns the true atomic number of an atom.

int psi::Molecule::unique ( int  iuniq) const
inline

Returns the overall number of the iuniq'th unique atom.

GeometryUnits psi::Molecule::units ( ) const
inline

Gets the geometry units.

void psi::Molecule::update_geometry ( )

Updates the geometry, by (re)interpreting the string used to create the molecule, and the current values of the variables. The atoms list is cleared, and then rebuilt by this routine.

bool psi::Molecule::valid_atom_map ( double  tol = 0.05) const

Check if current geometry fits current point group.

double psi::Molecule::x ( int  atom) const

x position of atom

Vector3 psi::Molecule::xyz ( int  atom) const

Returns a Vector3 with x, y, z position of atom.

double psi::Molecule::xyz ( int  atom,
int  _xyz 
) const

Returns x, y, or z component of 'atom'.

double psi::Molecule::y ( int  atom) const

y position of atom

const double & psi::Molecule::Z ( int  atom) const

Nuclear charge of atom.

double psi::Molecule::z ( int  atom) const

z position of atom

Member Data Documentation

std::vector<std::string> psi::Molecule::all_variables_
protected

A list of all variables known, whether they have been set or not.

int* psi::Molecule::atom_to_unique_
protected

Atom to unique atom mapping array (length natom)

EntryVector psi::Molecule::atoms_
protected

Atom info vector (no knowledge of dummy atoms)

bool psi::Molecule::cart_
protected

Whether this molecule has at least one cartesian entry.

bool psi::Molecule::charge_specified_
protected

Whether the charge was given by the user.

int** psi::Molecule::equiv_
protected

Equivalent atom mapping array.

bool psi::Molecule::fix_orientation_
protected

Reorient or not?

std::vector<int> psi::Molecule::fragment_charges_
protected

The charge of each fragment.

std::vector<int> psi::Molecule::fragment_multiplicities_
protected

The multiplicity of each fragment.

std::vector<FragmentType> psi::Molecule::fragment_types_
protected

A list describing how to handle each fragment.

std::vector<std::pair<int, int> > psi::Molecule::fragments_

The list of atom ranges defining each fragment from parent molecule.

EntryVector psi::Molecule::full_atoms_
protected

Atom info vector (includes dummy atoms)

FullPointGroup psi::Molecule::full_pg_
protected

Full point group.

int psi::Molecule::full_pg_n_
protected

n of the highest rotational axis Cn

std::map<std::string, double> psi::Molecule::geometry_variables_
protected

A listing of the variables used to define the geometries.

double psi::Molecule::input_units_to_au_
protected

The conversion factor to take input units to Bohr.

bool psi::Molecule::lock_frame_
protected

Nilpotence boolean (flagged upon first determination of symmetry frame, reset each time a substantiative change is made)

int psi::Molecule::molecular_charge_
protected

The molecular charge.

bool psi::Molecule::move_to_com_
protected

Move to center of mass or not?

int psi::Molecule::multiplicity_
protected

The multiplicity (defined as 2Ms + 1)

bool psi::Molecule::multiplicity_specified_
protected

Whether the multiplicity was specified by the user.

std::string psi::Molecule::name_
protected

Molecule (or fragment) name.

int* psi::Molecule::nequiv_
protected

Number of equivalent atoms per unique atom (length nunique_)

int psi::Molecule::nunique_
protected

Number of unique atoms.

std::shared_ptr<PointGroup> psi::Molecule::pg_
protected

Point group to use with this molecule.

bool psi::Molecule::reinterpret_coordentries_
protected

Reinterpret the coord entries or not Default is true, except for findif

std::string psi::Molecule::symmetry_from_input_
protected

Symmetry string from geometry specification.

GeometryUnits psi::Molecule::units_
protected

The units used to define the geometry.

bool psi::Molecule::zmat_
protected

Whether this molecule has at least one zmatrix entry.


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