10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-03 20:54:00 +01:00

Updated Tutorial (markdown)

Anthony Scemama 2016-01-18 21:17:39 +01:00
parent 325d3cd21d
commit 87f7a9b5bf

@ -1,4 +1,4 @@
In this tutorial, we will run a CIPSI calculation on the HCN molecule in two basis set. Before using the quantum package, you need to load the needed environment variables by sourcing the ``$QP_ROOT/quantum_package.rc`` file. In this tutorial, we will run a CIPSI calculation on the HCN molecule in two basis sets. Before using the quantum package, you need to load the needed environment variables by sourcing the ``$QP_ROOT/quantum_package.rc`` file.
For example:: For example::
`source $HOME/quantum_package/quantum_package.rc` `source $HOME/quantum_package/quantum_package.rc`
@ -16,7 +16,7 @@ This command will compile everything and install the `Hartree-Fock` and `Full-CI
``` ```
#Create the EZFIO input file #Create the EZFIO input file
The EZFIO is a HDF5 like format. The same EZFIO will serve from both input and output data. The EZFIO is a hierarchical data format which uses the hierarchy of the file system to organize the data. The EZFIO file is a database which will contain the input and output data. To access the data in the EZFIO file, you can use the provided API, or tools such as `qp_edit`, or even look at the files present in the directories.
First, create an `xyz` file containing the coordinates of the molecule. The file ``hcn.xyz`` contains: First, create an `xyz` file containing the coordinates of the molecule. The file ``hcn.xyz`` contains:
@ -39,12 +39,12 @@ Now, this `xyz` file is used to generate an `EZFIO` input directory using the ``
[-p] Using pseudopotentials [-p] Using pseudopotentials
``` ```
To generate ``hcn.ezfio`` in the (enormous) 6-31G basis set, we use:: To generate ``hcn.ezfio`` in the 6-31G basis set, we use::
`qp_create_ezfio_from_xyz -b "6-31G" hcn.xyz` `qp_create_ezfio_from_xyz -b "6-31G" hcn.xyz`
You can see a review of the EZFIO file & all the option available for all the binary installed using the `qp_edit` command. You can edit interactively the EZFIO file with all the options available for all the binaries installed using the `qp_edit` command.
#Run the SCF and Full-CI calculations #Run the SCF and Full-CI calculations
@ -52,21 +52,21 @@ First, create the canonical MOs by running an SCF calculation::
``` ```
qp_run SCF hcn.ezfio qp_run SCF hcn.ezfio
``` ```
The expected SCF energy is -92.8278567. The expected SCF energy is -92.8278567 au.
Now we want to run the full-ci calculation. Type Now we want to run the Full-CI calculation. Type
``` ```
qp_run full_ci hcn.ezfio qp_run full_ci hcn.ezfio
``` ```
By default, this will create the lowers 10.000 determinant wave-function (this number is set by the `n_det_max` variable). When this point is reach, we will compute the second order perturbative energies (the PT2, handle by the `do_pt2_end` variable) to generate a really good approximation of the full-ci. By default, this will select the most important 10.000 determinants in the wave-function (this number is set by the `determinants/n_det_max` variable). When this point is reached, the second order perturbative correction is computed (handled by the `do_pt2_end` variable) to generate a really good approximation of the full-ci.
The variational energie should be '-93.043096' and the full-ci approximation energie should be '-93.051924'. The variational energy should be '-93.043096' and the Full-CI approximation energy should be '-93.051924'.
#Speed up the calculus (Frozen core method) # Freeze core electrons in the CI
We will enlarge the basis set (up to `cc-pvdz`) and frozen the orbital for speed-up the calculus. We will enlarge the basis set to `cc-pvdz` and freeze the core orbitals in the CI calculation.
First create the new EZFIO with the relevant basis-set First create the new EZFIO with the relevant basis-set
`qp_create_ezfio_from_xyz -b "cc-pvdz" hcn.xyz -o hcn_large.ezfio` `qp_create_ezfio_from_xyz -b "cc-pvdz" hcn.xyz -o hcn_large.ezfio`
@ -77,7 +77,7 @@ Then run the SCF
``` ```
The expected SCF energy is -92.8832967. The expected SCF energy is -92.8832967.
We want to run the selected full-ci calculation in the valence only. For this, we will use the ``qp_set_mo_class`` utility. The options are We want to run the selected Full-CI calculation in the valence only. For this, we will use the ``qp_set_mo_class`` utility. The options are
-act range Range of active orbitals -act range Range of active orbitals
-core range Range of core orbitals -core range Range of core orbitals
@ -90,7 +90,7 @@ We set 2 first canonical orbitals as `core` and all the remaining MOs are set as
qp_set_mo_class hcn_large.ezfio -core "[1,2]" -act "[3-35]" qp_set_mo_class hcn_large.ezfio -core "[1,2]" -act "[3-35]"
``` ```
Then, edit the ``hcn_large.ezfio`` directory to modify the options of the selected Full-CI calculation:: Then, edit ``hcn_large.ezfio`` to modify the options of the selected Full-CI calculation::
``` ```
qp_edit hcn_large.ezfio qp_edit hcn_large.ezfio
``` ```
@ -107,7 +107,7 @@ And run the Full-CI calculation::
``` ```
qp_run full_ci hcn_large.ezfio qp_run full_ci hcn_large.ezfio
``` ```
The expected variationnel energy is -93.16819314. The expected variational energy is -93.16819314.
From the current wave function, we can generate the corresponding natural orbitals:: From the current wave function, we can generate the corresponding natural orbitals::
``` ```