API reference¶
Note
Work in progress. Many function do not yet follow the numpy standard in their documentation!
This page contains a structured overview of the python API of adcc. See also the Index.
adcc module¶
Functions¶
run_adc (data_or_matrix[, n_states, kind, …]) 
Run an ADC calculation. 
add (a, b[, out]) 
Return the elementwise sum of two objects If out is given the result will be written to the latter tensor. 
contract (contraction, a, b[, out]) 
Form a single, einsumlike contraction, that is contract tensor a and be to form out via a contraction defined by the first argument string, e.g. 
copy (a) 
Return a copy of the input tensor. 
divide (a, b[, out]) 
Return the elementwise division of two objects If out is given the result will be written to the latter tensor. 
dot (a, b) 
Form the scalar product between two tensors. 
empty_like (a) 
Return an empty tensor of the same shape and symmetry as the input tensor. 
linear_combination (coefficients, tensors) 
Form a linear combination from a list of tensors. 
multiply (a, b[, out]) 
Return the elementwise product of two objects If out is given the result will be written to the latter tensor. 
nosym_like (a) 
Return tensor of the same shape, but without the symmetry setup of the input tensor. 
ones_like (a) 
Return tensor of the same shape and symmetry as the input tensor, but initialised to 1, that is the canonical blocks are 1 and the other ones are symmetryequivalent (1 or 0) 
subtract (a, b[, out]) 
Return the elementwise difference of two objects If out is given the result will be written to the latter tensor. 
transpose (a[, axes]) 
Return the transpose of a tensor as a copy. 
zeros_like (a) 
Return a zero tensor of the same shape and symmetry as the input tensor. 
set_n_threads (arg0) 
Set the number of running worker threads used by adcc 
get_n_threads () 
Get the number of running worker threads used by adcc. 
guesses_singlet (matrix, n_guesses[, block, …]) 
Obtain guesses for computing singlet states by inspecting the passed ADC matrix. 
guesses_triplet (matrix, n_guesses[, block, …]) 
Obtain guesses for computing triplet states by inspecting the passed ADC matrix. 
guesses_any (matrix, n_guesses[, block, …]) 
Obtain guesses by inspecting a block of the diagonal of the passed ADC matrix. 
guess_symmetries (matrix[, irrep, …]) 
Return guess symmetry objects (one for each AmplitudeVector block) such that the specified requirements on the guesses are satisfied. 
guesses_spin_flip (matrix, n_guesses[, …]) 
Obtain guesses for computing spinflip states by inspecting the passed ADC matrix. 
guess_zero (matrix[, irrep, spin_change, …]) 
Return an AmplitudeVector object filled with zeros, but where the symmetry has been properly set up to meet the specified requirements on the guesses. 
adc0 (*args, **kwargs) 
Run an ADC calculation. 
adc1 (*args, **kwargs) 
Run an ADC calculation. 
adc2 (*args, **kwargs) 
Run an ADC calculation. 
adc2x (*args, **kwargs) 
Run an ADC calculation. 
adc3 (*args, **kwargs) 
Run an ADC calculation. 
cvs_adc0 (*args, **kwargs) 
Run an ADC calculation. 
cvs_adc1 (*args, **kwargs) 
Run an ADC calculation. 
cvs_adc2 (*args, **kwargs) 
Run an ADC calculation. 
cvs_adc2x (*args, **kwargs) 
Run an ADC calculation. 
cvs_adc3 (*args, **kwargs) 
Run an ADC calculation. 
banner ([colour, show_doi, show_website]) 
Return a nice banner describing adcc and its components 
Classes¶
AdcMatrix (method, hf_or_mp) 

AdcBlockView (fullmatrix, block) 

AdcMatrixlike (innermatrix) 
Class implementing minimal functionality of AdcMatrixlike objects. 
AdcMethod (method) 

Symmetry (mospaces, space[, irreps_allowed, …]) 

ReferenceState (hfdata[, core_orbitals, …]) 

AmplitudeVector (*tensors) 

HartreeFockProvider 
Abstract class defining the interface for passing data from the host program to adcc. 
ExcitedStates (data[, method, property_method]) 

Tensor (sym_or_mo[, space, irreps_allowed, …]) 

DictHfProvider (*args, **kwargs) 

DataHfProvider (data) 

OneParticleOperator (mospaces[, …]) 

DefaultCachingPolicy () 

GatherStatisticsPolicy () 
This caching policy advises against caching any data, it does, however, keep track of the number of times the caching for a particular object has been requested and thus allows to gain some insight on the helpfulness of particular cachings. 
LazyMp (hf[, caching_policy]) 
libadcc: Python bindings for adccore¶
The libadcc Python module contains the python bindings of adccore: C++ core library. They are generated directly from the C++ source code using pybind11 and the sources contained in the extension subfolder of the adcc github repository.
It is not recommended to call these functions directly, but instead resort to the higherlevel functionality from the adcc module.
Functions¶
add (arg0, arg1, arg2) 

amplitude_vector_enforce_spin_kind (arg0, …) 
Apply the spin symmetrisation required to make the doubles and higher parts of an amplitude vector consist of components for a particular spin kind only. 
compute_gs2state_optdm (arg0, arg1, arg2, arg3) 

compute_modified_transition_moments (arg0, …) 

compute_state2state_optdm (arg0, arg1, arg2, …) 

compute_state_diffdm (arg0, arg1, arg2, arg3) 

contract (arg0, arg1, arg2) 

contract_to (arg0, arg1, arg2, arg3) 

divide (arg0, arg1, arg2) 

get_n_threads () 
Get the number of running worker threads used by adcc. 
get_n_threads_total () 
Get the total number of threads (running and sleeping) used by adcc. 
guess_symmetries (arg0, arg1) 
Return a list of symmetry objects in order to construct the singles / doubles part of the AmplitudeVector. 
guess_zero (arg0, arg1) 
Return an AmplitudeVector object filled with zeros, but where the symmetry has been properly set up to meet the requirements of the AdcGuessKind object 
guesses_from_diagonal (arg0, arg1, arg2, …) 
Obtain guesses by inspecting a block of the diagonal of the passed ADC matrix. 
make_symmetry_eri (arg0, arg1) 
Return the Symmetry object like it would be set up for the passed subspace of the electronrepulsion tensor. 
make_symmetry_operator (arg0, arg1, arg2, arg3) 
Return the Symmetry object for an orbital subspace block of a oneparticle operator 
make_symmetry_operator_basis (arg0, arg1, arg2) 
Return the symmetry object for an operator in the AO basis. 
make_symmetry_orbital_coefficients (arg0, …) 
Return the Symmetry object like it would be set up for the passed subspace of the orbital coefficients tensor. 
make_symmetry_orbital_energies (arg0, arg1) 
Return the Symmetry object like it would be set up for the passed subspace of the orbital energies tensor. 
multiply (arg0, arg1, arg2) 

set_n_threads (arg0) 
Set the number of running worker threads used by adcc 
set_n_threads_total (arg0) 
Set the total number of threads (running and sleeping) used by adcc. 
subtract (arg0, arg1, arg2) 
Classes¶
AdcGuessKind 
Class which collects information about the kind of guess vectors to be constructed. 
AdcIntermediates 
Class holding the computed ADC intermediates. 
AdcMatrix 
Class representing the AdcMatrix in various variants. 
AdcMemory 
Class controlling the memory allocations for adcc ADC calculations. 
AmplitudeVector 
Class representing an AmplitudeVector. 
CachingPolicy_i 
Should a particular tensor given by a label, its space string and the string of the spaces involved in the most expensive contraction be stored. 
HartreeFockProvider 
Abstract class defining the interface for passing data from the host program to adcc. 
HartreeFockSolution_i 
Interface class representing the data expected in adcc from an interfacing HF / SCF program. 
LazyMp 
Class representing information about the Mo/llerPlesset results from ADCman. 
MoIndexTranslation 
Helper object to extract information from indices into orbitals subspaces and to map them between different indexing conventions (full MO space, MO subspaces, indexing convention in the HF Provider / SCF host program, … 
MoSpaces 
Class setting up the molecular orbital index spaces and subspaces and exposing information about them. 
OneParticleOperator 
Class representing a oneparticle operator. 
ReferenceState 
Class representing information about the reference state for adcc. 
Symmetry 
Container for Tensor symmetry information 
Tensor 
Class representing the Tensor objects used for computations in adcc 