variable¶
- psi4.core.variable(key)¶
Return copy of scalar or array QCVariable key from global memory.
- Parameters:
key (
str
) – Case-insensitive key to global double orMatrix
storage maps.- Returns:
Requested QCVariable from global memory.
- Return type:
- Raises:
KeyError – If key not set on self.
Example
>>> psi4.gradient("hf/cc-pvdz") >>> psi4.variable("CURRENT ENERGY") -100.00985995185668 >>> psi4.variable("CURRENT DIPOLE") array([ 0. , 0. , -0.83217802]) >>> psi4.variable("CURRENT GRADIENT") <psi4.core.Matrix object at 0x12d884fc0> >>> psi4.variable("CURRENT GRADIENT").np array([[ 6.16297582e-33, 6.16297582e-33, -9.41037138e-02], [-6.16297582e-33, -6.16297582e-33, 9.41037138e-02]])