| Both sides previous revision Previous revision Next revision | Previous revision |
| properties_and_expectation_values [2025/07/31 13:41] – [Examples] doll | properties_and_expectation_values [2025/09/10 06:37] (current) – add example for pop , spin doll |
|---|
| 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> |
| |
| ''FPOL,OPER=DM,PROC=myproc'' | ''FPOL,OPER=DM,PROC=myproc'' |
| |
| where ''myproc'' has to be defined. Instead of ''FGRAD,OPER=DM'' simply ''FGRAD,DM'' may be used, if the operator is the first argument which follows ''FGRAD'' or ''FPOL''. | 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'' . | 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, two-point and four-point formulas 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. | 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 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. It may be switched off with ''ZERO_TRACE_UNUSED'' | 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). | The energy calculation has to be done with a ''PROCEDURE'' (alternatively, ''STARTCMD'' may also be used). |
| |
| !compare with twofold numerical derivative | !compare with twofold numerical derivative |
| fpol,dm,proc=myproc,strength=0.001 | fpol,dm,proc=myproc |
| </code> | </code> |
| |