Molecular system

ElemCo.MSystemModule

Info about molecular system (geometry/basis).

Atom and FlexibleSystem from AtomsBase package are used for the atoms and the molecular system, respectively.

The molecular system is the core of the simulation. It contains all the information about the molecule, including the geometry and basis sets. The molecular system is an instance of FlexibleSystem from the AtomsBase.jl package, and the basis set information is stored in :basis field of the molecular system and each atom. The molecular system is defined using the parse_geometry function:

parse_geometry(geometry, basis)

where geometry is a string containing the molecular geometry in the XYZ format (or a xyz-file), and basis is a dictionary containing the basis set information (or a string defining the AO basis).

Geometry

The geometry of the molecule is defined using the geometry argument of the parse_geometry function. The geometry is defined in the XYZ format. Here's an example of how you can define the geometry of a water molecule:

geometry="bohr
     O      0.000000000    0.000000000   -0.130186067
     H1     0.000000000    1.489124508    1.033245507
     H2     0.000000000   -1.489124508    1.033245507"

The first line of the geometry string contains the units of the coordinates. The supported units are bohr and angstrom (default is bohr). If the first line contains the number of atoms (as in the standard XYZ format), then the next line is skipped, and the default units are angstrom. The coordinates of the atoms are specified in the following lines. Each line contains the atomic symbol and the coordinates of the atom. The coordinates are separated by spaces or tabs.

Basis set

see Basis set

The basis set is defined using the basis argument of the parse_geometry function.

Exported functions and types

ElemCo.MSystem.electron_distributionMethod
electron_distribution(ms::AbstractSystem, minbas::AbstractString)

Return the averaged number of electrons in the orbitals in the minimal basis set.

Number of orbitals in the minimal basis set has to be specified in minbas.jl.

ElemCo.MSystem.genxyzMethod
genxyz(ms::AbstractSystem; unit=u"angstrom")

Generate xyz string with elements without numbers.

ElemCo.MSystem.genxyzMethod
genxyz(ac::Atom; unit=u"angstrom")

Generate xyz string with element without numbers.

ElemCo.MSystem.parse_geometryMethod
parse_geometry(geometry::AbstractString, basis::AbstractString)

Parse geometry geometry and return FlexibleSystem object. The geometry can be in xyz format or in a file. The basis set can be defined for each element in the geometry.

ElemCo.MSystem.parse_geometryMethod
parse_geometry(geometry::AbstractString, basis::Dict)

Parse geometry geometry and return FlexibleSystem object. The geometry can be in xyz format or in a file. The basis set can be defined for each element in the geometry.

Internal functions and types

ElemCo.MSystem.genbasis4elementMethod
genbasis4element(basis::Dict,elem::AbstractString)

Set element specific basis from, e.g., Dict("ao"=>"cc-pVDZ; o=aug-cc-pVDZ","jkfit"=>"cc-pvdz-jkfit")

ElemCo.MSystem.guess_noccMethod
guess_nocc(ms::AbstractSystem)

Guess the number of alpha and beta occupied orbitals in the neutral system.

ElemCo.MSystem.nshell4l_minbasMethod
nshell4l_minbas(nnum, basis::String)

Return the number of shells for each angular momentum in the minimal basis set.

ElemCo.MSystem.parse_xyz_geometryMethod
parse_xyz_geometry(xyz_lines::AbstractArray, basis::Dict)

Parse xyz geometry xyz_lines stored as a vector of strings. Return array of Atoms and an empty string in case of success.

Empty lines are skipped. The default units are bohr. If the line is bohr or angstrom: change the units. If the first line is a number: assume xyz format and skip the second line (in this case, the default units are angstroms). If parsing fails: return empty array and the line that failed.

ElemCo.MSystem.try2create_atomFunction
try2create_atom(line::AbstractString, basis::Dict, unit=u"bohr")

Create Atom from a line <Atom> x y z.

unit is the unit of the coordinates. Returns the center and a bool success variable. If the line has a different format: return dummy center and false.