Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
properties_and_expectation_values [2025/02/02 15:44] – [Intermolecular interaction energies] wernerproperties_and_expectation_values [2025/09/10 06:37] (current) – add example for pop , spin doll
Line 1: Line 1:
-====== Intermolecular interaction energies ====== 
- 
-Counterpoise corrected (or uncorrected) intermolecular interaction energies can be computed automatically using the ''INTERACT'' procedure: 
- 
-''INTERACT'', //options// 
- 
-The INTERACT command can follow any input for a complete energy calculation and then computes the interaction energy for the last computed energy method. Alternatively, the energy calculation can be defined in a procedure. In this case, the procedure must contain input for a complete energy calculation, including the orbital optimization.  
- 
-Dimer and monomer calculations must be carried out with the same symmetry. Note that the symmetry in the monomer CP calculations is sometimes lower than that of the dimer. The program checks the symmetry and stops with a message if a lower symmetry needs to be specified.  
- 
- 
- 
-The following //options// are available: 
- 
-* ** ''DO_CP''**[=//value//] If zero, do not compute CP-correction (**default DO_CP=1**).\\ 
-* ** ''DO_NOCP''**[=//value//] Calculate non-cp corrected interaction energy (**default  DO_NOCP=0**).\\ 
-* ** ''PROC[NAME]''**=//procname// Use the given procedure to carry out the energy calculations.\\ 
-* ** ''STARTCMD''**=//command// The energy calculation is defined by all input starting at this command until the **INTERACT** command.\\ 
-* ** ''VARIABLE=''**=//name// Use energies provided in variable //name// to compute interaction energies. This can be a vector of values. If not given, a selection of energy variables is determined automatically.\\ 
-* **''UNIT''**=//unit// Specifies a unit for the printed interaction energies. Can be KCAL, KJ, AU, or CM (**default KCAL/MOL**).\\ 
-* **''FAC''**=//[factors]// Factors for each monomer. For example, if the two monomers in a dimer calculation are symmetry equivalent, one can give ''FAC=[2,0]'', which means that the second monomer calculation is skipped. The sum of the factors must equal the number of monomers.\\ 
-* **''CHARGE''**=//[charges]// Charges for each monomer (default zero) 
-* **''SPIN''**=//[spins]// Spins for each monomer. This means the number of singly occupied orbitals, i.e. 2 $m_s$. The spin of the complex is assumed to be the sum of the monomer spins.\\ 
-* ** ''FILE|SAVE''**=//filename// Save intermediate results in the given file. If the file is present, the program automatically restarts from it (unless ''NEW'' is given, see below). New results for later restarts are written to this file.\\ 
-* ** ''START[FILE]''**=//filename// File used for restart (**default FILE**). This can be used to avoid overwriting of the restart data, for example in connection with ''REPEAT'' (see below). When ''STARTFILE'' and ''FILE'' are present and ''FILE'' is empty (new), ''REPEAT'' is implied. If ''FILE'' is not empty, restart data are taken from it.\\ 
-* ** ''NEW''** A new restart file is created. If it exists, it is overwritten.\\ 
-* ** ''REPEAT''** The calculation is repeated even if restart data are found. For example, one could first do the DF-HF and DF-CABS calculations, and subsequently carry out PNO-LCCSD(T)-F12 calculations. The difference to ''NEW'' is that a restart is carried out, and for example orbital records, monomers, and symmetry are remembered.\\ 
-* ** ''USE_LOG[FILE]''** If this option is given, the outputs are written to the logfile. \\ 
-* ** ''MAXCALC''**=//value// Only the given number of molecules is computed. This requires ''FILE'' to be present to save and restart the data. For example, in a new calculation ''MAXCALC=1'' would only compute the dimer energy. The option can be used to split an otherwise exceedingly long calculation into several smaller ones. \\ 
-* **''SCALE''**=//factor// Two atoms are considered as bonded if the distance between them is smaller than sum of the atomic radii multiplied by this factor. This can affect the automatic detection of the monomers (**default 1.2**).\\ 
-* **''NOSYM''** Forces the calculation to be carried out without symmetry.\\ 
-* **''RECORD''**=//record// Dump record number for the dimer calculation. The records for each subsequent monomer calculations are incremented by one. Normally, the program determines the record number automatically and this option should normally not be given.\\ 
-* **''MERGE''**=//[list of molecules]// Merge the specified molecules to one monomer. The numbering of molecules is as they are given in the total complex. For example, if the complex consists of 3 monomers (as, e.g. GGG in the L7 test set), one can merge the second and third to one using ''MERGE=[2,3]''. Then the interaction energy of G+GG will be computed.\\ 
 ====== Properties and expectation values ====== ====== Properties and expectation values ======
  
Line 91: Line 58:
 theta=104                             !bond angle theta=104                             !bond angle
 hf                                    !do scf calculation hf                                    !do scf calculation
-property                              !call property program+{property                             !call property program
 orbital                               !read scf orbitals orbital                               !read scf orbitals
 density                               !read scf density matrix density                               !read scf density matrix
 dm                                    !compute dipole moments and print orbital contributions dm                                    !compute dipole moments and print orbital contributions
-qm                                    !compute quadrupole moments and print orbital contributions+qm}                                   !compute quadrupole moments and print orbital contributions
 {multi;wf;state,2;dm                  !do full-valence CASSCF {multi;wf;state,2;dm                  !do full-valence CASSCF
 natorb,state=1.1                      !compute natural orbitals for state 1.1 natorb,state=1.1                      !compute natural orbitals for state 1.1
Line 302: Line 269:
 ci;dm,9000.2; ci;dm,9000.2;
 pop;density,9000.2 pop;density,9000.2
 +</code>
 +
 +In the following example, the population for charge and spin is computed:
 +
 +<code - examples/li_pop.inp>
 +geometry={li}
 +basis=vdz
 +hf
 +pop;
 +pop;density,type=spin
 </code> </code>
  
Line 436: Line 413:
 --- ---
 </code> </code>
 +
 +===== Derivatives with respect to fields (dipole, quadrupole, second and third moments) =====
 +
 +Derivatives with respect to fields can be computed with the keywords ''FGRAD'' (1st derivative) and ''FPOL'' (2nd derivative). The fields may be dipole (''DM''), quadrupole (''QM''), second (''SM'') and third (''TM'') moments, and also their individual components (e.g. ''DMX'', ''XZ'', ''QMXY'', ''XXX'').
 +
 +Second derivatives include a minus sign, e.g. $$-\frac{\partial^2 E}{\partial d_i \partial d_j}$$ where $d_i$ are the components of the dipole field.
 +
 +
 +The syntax for the first or second derivative with respect to a dipole field is like this:
 +
 +''FGRAD,OPER=DM,PROC=myproc''
 +or
 +''FPOL,OPER=DM,PROC=myproc''
 +
 +where ''myproc'' has to be defined.
 +
 +By default a two-point formula is used for first derivatives (keyword ''CENTRAL''). Alternatively, a forward-difference formula ''FORWARD'' (fast, but inaccurate) or a fourpoint formula may be used ''FOURPOINT'' .
 +
 +For second derivatives, central (1 central point + 2 more points for the diagonal part, 2*2 points for the off-diagonal part) and four-point formulas (central point + 4 more points for the diagonal part, 4*4 points for the off-diagonal part) are implemented. If available, analytical first gradients may be used with the keyword ''use_grad'' so that only the second derivative is done numerically. This may require the ''expec'' keyword to compute the analytical first derivative.
 +
 +The default step size is 0.001 a.u. and may be changed with the option ''STRENGTH''
 +
 +The quadrupole tensor is traceless which is exploited by default in the case of first derivatives. It may be switched off with ''ZERO_TRACE_UNUSED''
 +
 +The energy calculation has to be done with a ''PROCEDURE'' (alternatively, ''STARTCMD'' may also be used). 
 +
 +
 +==== Examples ====
 +
 +This example shows how dipole, quadrupole and third moments can be obtained by computing derivatives with respect to the corresponding fields, and the dipole polarizability.
 +
 +<code - examples/h2o2_fgrad_fpol.inp>
 +geometry={4
 +H2O2
 +O1      0.0000   0.7375  -0.0528
 +O2      0.0000  -0.7375  -0.0528
 +H3      0.8190   0.8170   0.4220
 +H4     -0.8190  -0.8170   0.4220
 +}
 +
 +basis=def2-svp
 +{hf}
 +{mp2;expec,dm,qm,tm}
 +
 +fgrad,dm,proc=myproc
 +fgrad,qm,proc=myproc
 +fgrad,tm,proc=myproc
 +fpol,dm,proc=myproc
 +
 +proc myproc
 +{hf}
 +{mp2}
 +endproc
 +
 +
 +
 +</code>
 +
 +This example shows how ''use_grad'' may be used:
 +
 +
 +<code - examples/h2o_fpol_dm_use_grad_ccsd.inp>
 +geometry={   3
 +H2O
 +O          0.0000000000        0.0000000000       -0.0573384885
 +H          0.7581330543        0.0000000000        0.5338192442
 +H         -0.7581330543        0.0000000000        0.5338192442
 +}
 +
 +basis=def2-svp
 +{hf}
 +
 +!use first analytial derivative
 +fpol,dm,proc=myproc,use_grad
 +
 +proc myproc
 +{hf}
 +{ccsd
 +expec,dm}
 +endproc
 +
 +
 +!compare with twofold numerical derivative
 +fpol,dm,proc=myproc
 +</code>
 +
  
 ===== Relativistic corrections ===== ===== Relativistic corrections =====