diff --git a/Tutorial.md b/Tutorial.md index 2d7f953..fa54988 100644 --- a/Tutorial.md +++ b/Tutorial.md @@ -1,4 +1,4 @@ -In this tutorial, we will run a CIPSI calculation on the HCN molecule. 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 set. Before using the quantum package, you need to load the needed environment variables by sourcing the ``$QP_ROOT/quantum_package.rc`` file. For example:: `source $HOME/quantum_package/quantum_package.rc` @@ -39,19 +39,42 @@ Now, this `xyz` file is used to generate an `EZFIO` input directory using the `` [-p] Using pseudopotentials ``` -To generate ``hcn.ezfio`` in the cc-pVDZ basis set, we use:: +To generate ``hcn.ezfio`` in the (enormous) 6-31G basis set, we use:: -`qp_create_ezfio_from_xyz -b "cc-pvdz" 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. + #Run the SCF and Full-CI calculations First, create the canonical MOs by running an SCF calculation:: ``` qp_run SCF hcn.ezfio ``` +The expected SCF energy is -92.8278567. +Now we want to run the full-ci calculation. Type + +``` + 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. + +The variational energie should be '-93.043096' and the full-ci approximation energie should be '-93.051924'. + +#Speed up the calculus + +We will enlarge the basis set (up to `cc-pvdz`), and see who to do a CAS for speed-up the calculus. + +First create the new EZFIO with the relevant basis-set +`qp_create_ezfio_from_xyz -b "cc-pvdz" hcn.xyz -o hcn_large.ezfio` + +Then run the SCF +``` + qp_run SCF hcn_large.ezfio +``` 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 @@ -63,34 +86,36 @@ We want to run the selected full-ci calculation in the valence only. For this, w -virt range Range of virtual orbitals We set 2 first canonical orbitals as `core` and all the remaining MOs are set as active :: +``` + qp_set_mo_class hcn_large.ezfio -core "[1,2]" -act "[3-35]" +``` - qp_set_mo_class hcn.ezfio -core "[1,2]" -act "[3-35]" - -Then, edit the ``hcn.ezfio`` directory to modify the options of the selected Full-CI calculation:: - - qp_edit hcn.ezfio +Then, edit the ``hcn_large.ezfio`` directory to modify the options of the selected Full-CI calculation:: +``` + qp_edit hcn_large.ezfio +``` This will open a temporary file enabling the modification of the EZFIO directory. Search for the `Selected Full-CI` section, and set the ``n_det_max_fci`` option to 10000:: - +``` n_det_max = 10000 - +``` De-activate the calculation of the PT2-energy:: - +``` do_pt2_end = false - +``` And run the Full-CI calculation:: - +``` qp_run full_ci hcn.ezfio - -The expected variational energy is -93.16819314. +``` +The expected variationnel energy is -93.16819314. From the current wave function, we can generate the corresponding natural orbitals:: - +``` qp_run save_natorb hcn.ezfio - +``` Re-activate the calculation of the PT2-energy using qp_edit:: - +``` do_pt2_end = true - +``` And run the calculation again. The expected variational energy is -93.176409148 and the energy + the PT2 contribution is -93.194541427.