The script :py:mod:`wfns_make_script.py` runs a calculation using a set of arguments and optional arguments:
wfns_make_script.py [-h] --nelec NELEC --nspin NSPIN
--one_int_file ONE_INT_FILE --two_int_file TWO_INT_FILE
--wfn_type WFN_TYPE
[--nuc_repulsion NUC_NUC] [--optimize_orbs]
[--pspace PSPACE_EXC [PSPACE_EXC ...]]
[--objective OBJECTIVE] [--solver SOLVER]
[--solver_kwargs SOLVER_KWARGS]
[--wfn_kwargs WFN_KWARGS] [--load_orbs LOAD_ORBS]
[--load_ham LOAD_HAM] [--load_wfn LOAD_WFN]
[--load_chk LOAD_CHK] [--save_orbs SAVE_ORBS]
[--save_ham SAVE_HAM] [--save_wfn SAVE_WFN]
[--save_chk SAVE_CHK] [--memory MEMORY]
[--filename FILENAME]
where the arguments inside square brackets are optional.
--nelec NELEC
- Number of electrons in the wavefunction.
NELEC
is an integer. --nspin NSPIN
- Number of spin orbitals used in the wavefunction and Hamiltonian.
NSPIN
is an integer. --one_int_file ONE_INT_FILE
- One-electron integrals used to construct the chemical Hamiltonian.
The integrals are expressed with respect to spatial orbitals.
ONE_INT_FILE
is a numpy file that contains a two-dimensional square array of floats. The dimension of each axis is the number of spatial orbitals. --two_int_file TWO_INT_FILE
- Two-electron integrals used to construct the chemical Hamiltonian.
The integrals are expressed with respect to spatial orbitals.
TWO_INT_FILE
is a numpy file that contains a four-dimensional array of floats with equal dimension in all four axis. The dimension of each axis is the number of spatial orbitals. --wfn_type WFN_TYPE
- Type of the wavefunction.
WFNTYPE
must be one offci
,doci
,mps
, determinant-ratio,ap1rog
,apr2g
,apig
,apsetg
, orapg
.
--nuc_repulsion NUC_NUC
- Nuclear-nuclear repulsion energy (in Hartree).
If not provided, then it is set to
0.0
. --optimize_orbs
- Flag for optimizing the orbitals.
Currently, orbitals can be optimized only when the solver does not use the gradient (i.e.
cma
). If not provided, then orbitals are not optimized. --pspace PSPACE_EXC [PSPACE_EXC ...]
Orders of excitations that wil be used to construct the projection space. For the objectives
system
andleast_squares
, the projection space corresponds to the equations that will be created. For the objectivevariational
, the projection space correspond to the projection operators that are inserted to the left and right of the Hamiltonian. See :ref:`Objective <objective>` for more details.PSPACE_EXC
is a sequence of integers (orders of excitations) separated by space. Zeroth order excitation (i.e. HF ground state) is always included. If not provided, then first and second order excitations (and HF ground state) are used as the projection space (equivalent to--pspace 1 2
).--objective OBJECTIVE
Objective function that will be used to optimize the parameters.
OBJECTIVE
must be one ofsystem
,least_squares
, orvariational
. If not provided, thenleast_squares
is selected.See :ref:`Objective <objective>` for more details.
--solver SOLVER
Solver used to optimize the objective.
SOLVER
must be one ofcma
,diag
,minimize
,least_squares
, orroot
. If not provided, thencma
is selected.Solvers
cma
andminimize
can only be used with the objectivesleast_squares
andvariational
. Solversleast_squares
androot
can only be used with objectivesystem
. Solverdiag
can only be used with CI wavefunctions (wavefunction types offci
anddoci
).See XXX for more details.
--solver_kwargs SOLVER_KWARGS
Keyword arguments that will be passed to the solver method.
SOLVER_KWARGS
must be provided as a string that will be passed into the solver method, overwriting all keyword arguments. For example,--solver_kwargs 'sigma0=0.001'
will change the sigma value in thecma
solver.If not provided, then no keyword argument will be provided to the solver and its default setting will be used. See XXX for more details.
--wfn_kwargs WFN_KWARGS
Keyword arguments that will be passed to the wavefunction instance.
WFN_KWARGS
must be provided as a string that will be passed into the wavefunction instance, overwriting all keyword arguments. For example,--wfn_kwargs 'dimension=10'
will change the dimension of the matrices in the MPS wavefunction.If not provided, then no keyword argument will be provided to the wavefunction and its default setting will be used. See XXX for more details.
--load_orbs LOAD_ORBS
Transformation matrix that will be used to rotate the integrals in the Hamiltonian. This keyword can be used to port over the orbitals from another calculation (for example, from a different wavefunction calculation).
LOAD_ORBS
must be provided as a numpy file of a two-dimension array with correct dimensions. The number of rows must correspond with the dimension of an axis in the integrals.If the keyword
--load_ham
is also provided, then the integrals (orbitals) are rotated after instantiating the Hamiltonian. However, it is not recommended to use both keywords--load_orbs
and--load_ham
.If not provided, then integrals will not be rotated.
--load_ham LOAD_HAM
Parameters of the Hamiltonian that will be used to instantiate the Hamiltonian. This keyword can be used to port over the Hamiltonian parameters from another calculation (for example, from a different wavefunction calculation).
LOAD_HAM
must be provided as a numpy file of a one-dimension array with the correct dimension. The number of parameters must correspond with the number of elements in the upper triangular matrix of the anti-Hermitian matrix in the transformation operator.If the keyword
--load_orbs
is also provided, then the integrals (orbitals) are rotated after instantiating the Hamiltonian. However, it is not recommended to use both keywords--load_orbs
and--load_ham
.If not provided, then default Hamiltonian parameters (zeros) will be used.
--load_wfn LOAD_WFN
Parameters of the wavefunction that will be used to instantiate the wavefunction. This keyword can be used to port over the wavefunction parameters from another calculation (for example, from a different Hamiltonian/system).
LOAD_WFN
must be provided as a numpy file of a one-dimension array with the correct dimension. The number of parameters varies depending on the wavfunction type. If not provided, then the default parameters of the wavefunction will be used (almost always HF ground state).See XXX for more details.
--load_chk LOAD_CHK
Checkpoint in the optimization process. This keyword can be used to restart a calculation.
LOAD_CHK
must be provided as a numpy file of one-dimension array with the correct dimension. The number of parameters can vary depending on the number of active (not frozen) parameters in the optimization.See XXX for more details.
--save_orbs SAVE_ORBS
Transformation matrix that was used to rotate the integrals in the Hamiltonian. This keyword can be used to save the orbitals for use in another calculation. (for example, in a different wavefunction calculation).
SAVE_ORBS
is the name of the numpy file used to save the transformation matrix. Since transformation matrix is produced from the Hamiltonian parameters, it is not recommended to use both keywords--save_orbs
and--save_ham
.If not provided, then the transformation matrix will not be stored.
--save_ham SAVE_HAM
Parameters of the Hamiltonian that was used in Hamiltonian instance. This keyword can be used to save the Hamiltonian parameters for use in another calculation (for example, in a different wavefunction calculation).
SAVE_HAM
is the name of the numpy file used to save the Hamiltonian parameters. Since transformation matrix is produced from the Hamiltonian parameters, it is not recommended to use both keywords--save_orbs
and--save_ham
.If not provided, then Hamiltonian parameters are not saved.
--save_wfn SAVE_WFN
Parameters of the wavefunction that was used in wavefunction instance. This keyword can be used to save the wavefunction parameters for use in another calculation (for example, in a different Hamiltonian/system calculation).
SAVE_WFN
is the name of the numpy file used to save the wavefunction parameters.If not provided, then wavefunction parameters are not saved.
--save_chk SAVE_CHK
Checkpoint file that saves the values of all active (not frozen) parameters in the optimization process. This keyword can be used to save the progress of the optimization so that it can be restarted should the optimization fails prematurely.
SAVE_CHK
is the name of the numpy file used to save the checkpoint.If not provided, then wavefunction parameters are not saved.
--memory MEMORY
- Memory available for the wavefunction.
MEMORY
must be a string that ends withmb
(for MB) orgb
(for GB). If not provided, then no restrictions will be put on cache for the overlaps of wavefunction, which may result in memory overflow. --filename FILENAME
- Name of the script that will be produced.
FILENAME
must be a string. If not provided, then the script is printed out in theSTDOUT