📄 gaussbas.h
字号:
Several files in various directories are checked for basis set data. First, basis sets can be given by the user in the basis section at the top level of the main input file. Next, if a path is given with the basisdir keyword, then all of the files given with the basisfiles keyword are read in after appending their names to the value of basisdir. Basis sets can be given in these files in the basis section at the top level as well. If the named basis set still cannot be found, then GaussianBasisSet will try convert the basis set name to a file name and check first in the directory given by basisdir. Next it checks for the environment variable SCLIBDIR. If it is set it will look for the basis file in $SCLIBDIR/basis. Otherwise it will look in the source code distribution in the directory SC/lib/basis. If the executable has changed machines or the source code has be moved, then it may be necessary to copy the library files to your machine and set the SCLIBDIR environmental variable. The basis set itself is also given in the ParsedKeyVal format. It is a vector of shells with the keyword :basis: followed by the lowercase atomic name followed by : followed by the basis set name (which may need to be placed inside double quotes). Each shell reads the following keywords: <dl> <dt><tt>type</tt><dd> This is a vector that describes each component of this shell. For each element the following two keywords are read: <dl> <dt><tt>am</tt><dd> The angular momentum of the component. This can be given as the letter designation, s, p, d, etc. There is no default. <dt><tt>puream</tt><dd> If this boolean parameter is true then 5D, 7F, etc. shells are used. The default is false. This parameter can be overridden in the GaussianBasisSet specification. </dl> <dt><tt>exp</tt><dd> This is a vector giving the exponents of the primitive Gaussian functions. <dt><tt>coef</tt><dd> This is a matrix giving the coeffients of the primitive Gaussian functions. The first index gives the component number of the shell and the second gives the primitive number. </dl> An example might be easier to understand. This is a basis set specificition for STO-2G carbon: <pre> basis: ( carbon: "STO-2G": [ (type: [(am = s)] { exp coef:0 } = { 27.38503303 0.43012850 4.87452205 0.67891353 }) (type: [(am = p) (am = s)] { exp coef:1 coef:0 } = { 1.13674819 0.04947177 0.51154071 0.28830936 0.96378241 0.61281990 }) ] ) </pre> */ GaussianBasisSet(const Ref<KeyVal>&); GaussianBasisSet(StateIn&); virtual ~GaussianBasisSet(); void save_data_state(StateOut&); /// Return the name of the basis set. const char* name() const { return name_; } /// Return the Molecule object. Ref<Molecule> molecule() const { return molecule_; } /// Returns the SCMatrixKit that is to be used for AO bases. Ref<SCMatrixKit> matrixkit() { return matrixkit_; } /// Returns the SCMatrixKit that is to be used for SO bases. Ref<SCMatrixKit> so_matrixkit() { return so_matrixkit_; } /// Returns the SCDimension object for the dimension. RefSCDimension basisdim() { return basisdim_; } /// Return the number of centers. int ncenter() const; /// Return the number of shells. int nshell() const { return nshell_; } /// Return the number of shells on the given center. int nshell_on_center(int icenter) const; /** Return an overall shell number, given a center and the shell number on that center. */ int shell_on_center(int icenter, int shell) const; /// Return the center on which the given shell is located. int shell_to_center(int ishell) const { return shell_to_center_[ishell]; } /// Return the overall index of the first primitive from the given shell int shell_to_primitive(int ishell) const {return shell_to_primitive_[ishell]; } /// Return the number of basis functions. int nbasis() const { return nbasis_; } /// Return the number of basis functions on the given center. int nbasis_on_center(int icenter) const; /// Return the number of primitive Gaussians. int nprimitive() const { return nprim_; } /// Return the maximum number of functions that any shell has. int max_nfunction_in_shell() const; /** Return the maximum number of Cartesian functions that any shell has. The optional argument is an angular momentum increment. */ int max_ncartesian_in_shell(int aminc=0) const; /// Return the maximum number of primitive Gaussian that any shell has. int max_nprimitive_in_shell() const; /// Return the highest angular momentum in any shell. int max_angular_momentum() const; /// Return the maximum number of Gaussians in a contraction in any shell. int max_ncontraction() const; /** Return the maximum angular momentum found in the given contraction number for any shell. */ int max_am_for_contraction(int con) const; /// Return the maximum number of Cartesian functions in any shell. int max_cartesian() const; /// Return the number of the first function in the given shell. int shell_to_function(int i) const { return shell_to_function_[i]; } /// Return the shell to which the given function belongs. int function_to_shell(int i) const; /// Return a reference to GaussianShell number i. const GaussianShell& operator()(int i) const { return *shell_[i]; } /// Return a reference to GaussianShell number i. GaussianShell& operator()(int i) { return *shell_[i]; } /// Return a reference to GaussianShell number i. const GaussianShell& operator[](int i) const { return *shell_[i]; } /// Return a reference to GaussianShell number i. GaussianShell& operator[](int i) { return *shell_[i]; } /// Return a reference to GaussianShell number i. const GaussianShell& shell(int i) const { return *shell_[i]; } /// Return a reference to GaussianShell number i. GaussianShell& shell(int i) { return *shell_[i]; } /// Return a reference to GaussianShell number ishell on center icenter. const GaussianShell& operator()(int icenter,int ishell) const; /// Return a reference to GaussianShell number ishell on center icenter. GaussianShell& operator()(int icenter,int ishell); /// Return a reference to GaussianShell number j on center i. const GaussianShell& shell(int i,int j) const { return operator()(i,j); } /// Return a reference to GaussianShell number j on center i. GaussianShell& shell(int i,int j) { return operator()(i,j); } /** The location of center icenter. The xyz argument is 0 for x, 1 for y, and 2 for z. */ double r(int icenter,int xyz) const; /** Compute the values for this basis set at position r. The basis_values argument must be vector of length nbasis. */ int values(const SCVector3& r, ValueData *, double* basis_values) const; /** Like values(...), but computes gradients of the basis function values, too. The g_values argument must be vector of length 3*nbasis. The data will be written in the order bf1_x, bf1_y, bf1_z, ... */ int grad_values(const SCVector3& r, ValueData *, double*g_values,double* basis_values=0) const; /** Like values(...), but computes first and second derivatives of the basis function values, too. h_values must be vector of length 6*nbasis. The data will be written in the order bf1_xx, bf1_yx, bf1_yy, bf1_zx, bf1_zy, bf1_zz, ... */ int hessian_values(const SCVector3& r, ValueData *, double *h_values, double*g_values=0,double* basis_values=0) const; /** Compute the values for the given shell functions at position r. See the other values(...) members for more information. */ int shell_values(const SCVector3& r, int sh, ValueData *, double* basis_values) const; /** Like values(...), but computes gradients of the shell function values, too. See the other grad_values(...) members for more information. */ int grad_shell_values(const SCVector3& r, int sh, ValueData *, double*g_values, double* basis_values=0) const; /** Like values(...), but computes first and second derivatives of the shell function values, too. See the other hessian_values(...) members for more information. */ int hessian_shell_values(const SCVector3& r, int sh, ValueData *, double *h_values, double*g_values=0,double* basis_values=0) const; /// Returns true if this and the argument are equivalent. int equiv(const Ref<GaussianBasisSet> &b); /// Print a brief description of the basis set. void print_brief(std::ostream& =ExEnv::out0()) const; /// Print a detailed description of the basis set. void print(std::ostream& =ExEnv::out0()) const;};}#endif// Local Variables:// mode: c++// c-file-style: "CLJ"// End:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -