Program structure

Program structure#

import veloxchem as vlx

The VeloxChem program adopts a layered Python/C++ language structure.

veloxchem-structure

You can use the standard functions to get a more detailed view of the Python layer. The help function will give you a package description, stating the copyright agreement.

help(vlx)
Help on package veloxchem:

NAME
    veloxchem

DESCRIPTION
    #                                   VELOXCHEM
    #              ----------------------------------------------------
    #                          An Electronic Structure Code
    #
    #  SPDX-License-Identifier: BSD-3-Clause
    #
    #  Copyright 2018-2025 VeloxChem developers
    #
    #  Redistribution and use in source and binary forms, with or without modification,
    #  are permitted provided that the following conditions are met:
    #
    #  1. Redistributions of source code must retain the above copyright notice, this
    #     list of conditions and the following disclaimer.
    #  2. Redistributions in binary form must reproduce the above copyright notice,
    #     this list of conditions and the following disclaimer in the documentation
    #     and/or other materials provided with the distribution.
    #  3. Neither the name of the copyright holder nor the names of its contributors
    #     may be used to endorse or promote products derived from this software without
    #     specific prior written permission.
    #
    #  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
    #  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
    #  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    #  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
    #  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    #  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    #  SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
    #  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
    #  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    #  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

PACKAGE CONTENTS
    __main__
    aodensitymatrix
    aoindices
    atombdedriver
    atomtypeidentifier
    batchsize
    blockdavidson
    c2diis
    c6driver
    checkpoint
    cli
    conformergenerator
    cpcmdriver
    cphfsolver
    cppsolver
    cubicgrid
    cubicresponsedriver
    densityviewer
    densityvieweralternative
    dftutils
    dispersionmodel
    distributedarray
    doubleresbeta
    embedding
    environment
    errorhandler
    evbdataprocessing
    evbdriver
    evbfepdriver
    evbreporter
    evbsystembuilder
    excitedstateanalysisdriver
    excitondriver
    features
    firstorderprop
    fockdriver
    gradientdriver
    griddriver
    hessiandriver
    hessianorbitalresponse
    imdatabasedriver
    imdatabasepointcollecter
    imforcefieldgenerator
    impescoordinates
    impesdriver
    inputparser
    interpolationdatapoint
    interpolationdriver
    linearsolver
    lreigensolver
    lreigensolverunrest
    lrsolver
    lrsolverunrest
    main
    matrices
    matrix
    mklconf
    mmdriver
    mmforcefieldgenerator
    mmgradientdriver
    mofbuilder
    mofmdprepare
    mofoptimizer
    mofpreparer
    mofutils
    mointsdriver
    molecularbasis
    molecularorbitals
    molecule
    mp2driver
    mpitask
    nonlinearsolver
    numerovdriver
    oneeints
    openmmdriver
    openmmdynamics
    openmmgradientdriver
    optimizationdriver
    optimizationengine
    orbitalviewer
    outputstream
    peforcefieldgenerator
    polarizabilitygradient
    polorbitalresponse
    profiler
    pubchemfetcher
    pulsedrsp
    quadraticresponsedriver
    reactionmatcher
    reaffbuilder
    respchargesdriver
    rifockdriver
    rigradientdriver
    rspabsorption
    rspc6
    rspcdspec
    rspcustomproperty
    rspdoublerestrans
    rsplinabscross
    rsppolarizability
    rspproperty
    rspshg
    rspthreepatransition
    rsptpa
    rsptpatransition
    sadguessdriver
    sanitychecks
    scfdriver
    scfgradientdriver
    scfhessiandriver
    scfrestdriver
    scfrestopendriver
    scfunrestdriver
    seminario
    shgdriver
    smddriver
    smdsolventproperties
    solvationbuilder
    solvationfepdriver
    subcommunicators
    submatrix
    symmetryanalyzer
    symmetryoperations
    tdacppsolver
    tdaeigensolver
    tdaeigensolverunrest
    tddftgradientdriver
    tddftorbitalresponse
    tdhfhessiandriver
    threepatransitiondriver
    tmparameters
    tpadriver
    tpafulldriver
    tpareddriver
    tpatransitiondriver
    trajectorydriver
    tsguesser
    uffparameters
    veloxchemlib
    vibrationalanalysis
    visualizationdriver
    waterparameters
    xtbdriver
    xtbgradientdriver
    xtbhessiandriver

VERSION
    1.0rc4

FILE
    /home/rocky/.conda/envs/vlxenv-dev/lib/python3.13/site-packages/veloxchem/__init__.py

Classes#

The functionality of VeloxChem is built into the classes it implements. An overview of the available classes is provided with the dir function.

dir(vlx)
['AODensityMatrix',
 'Absorption',
 'AtomBasis',
 'AtomBdeDriver',
 'AtomTypeIdentifier',
 'BasisFunction',
 'BlockDavidsonSolver',
 'BlockedGtoPairBlock',
 'C6',
 'C6Driver',
 'CircularDichroismSpectrum',
 'ComplexResponse',
 'ConformerGenerator',
 'CpcmDriver',
 'CphfSolver',
 'CubicGrid',
 'CubicResponseDriver',
 'DensityViewer',
 'DispersionModel',
 'ElectricDipoleIntegralsDriver',
 'ElectricDipoleMomentDriver',
 'ElectricDipoleMomentGeom100Driver',
 'EvbDataProcessing',
 'EvbDriver',
 'EvbFepDriver',
 'EvbForceGroup',
 'EvbReporter',
 'EvbSystemBuilder',
 'ExcitedStateAnalysisDriver',
 'ExcitonModelDriver',
 'FirstOrderProperties',
 'FockDriver',
 'FockGeom1000Driver',
 'FockGeom1010Driver',
 'FockGeom1100Driver',
 'FockGeom2000Driver',
 'GradientDriver',
 'GridDriver',
 'GtoBlock',
 'GtoPairBlock',
 'HessianDriver',
 'HessianOrbitalResponse',
 'IMDatabasePointCollecter',
 'IMForceFieldGenerator',
 'InputParser',
 'InterpolationDatapoint',
 'InterpolationDriver',
 'KineticEnergyDriver',
 'KineticEnergyGeom100Driver',
 'KineticEnergyGeom101Driver',
 'KineticEnergyGeom200Driver',
 'LinearAbsorptionCrossSection',
 'LinearResponseEigenSolver',
 'LinearResponseSolver',
 'LoPropDriver',
 'MMDriver',
 'MMForceFieldGenerator',
 'MMGradientDriver',
 'MOIntegralsDriver',
 'Matrices',
 'Matrix',
 'MofBuilder',
 'MolecularBasis',
 'MolecularOrbitals',
 'Molecule',
 'Mp2Driver',
 'MpiTask',
 'NuclearPotentialDriver',
 'NuclearPotentialErfDriver',
 'NuclearPotentialErfGeom010Driver',
 'NuclearPotentialErfGeom100Driver',
 'NuclearPotentialGeom010Driver',
 'NuclearPotentialGeom100Driver',
 'NuclearPotentialGeom101Driver',
 'NuclearPotentialGeom110Driver',
 'NuclearPotentialGeom200Driver',
 'NumerovDriver',
 'OpenMMDriver',
 'OpenMMDynamics',
 'OpenMMGradientDriver',
 'OptimizationDriver',
 'OrbitalViewer',
 'OutputStream',
 'OverlapDriver',
 'OverlapGeom100Driver',
 'OverlapGeom101Driver',
 'OverlapGeom200Driver',
 'PEForceFieldGenerator',
 'PolOrbitalResponse',
 'Polarizability',
 'PolarizabilityGradient',
 'QuadraticResponseDriver',
 'RIFockDriver',
 'RIFockGradDriver',
 'ReactionForceFieldBuilder',
 'ReactionMatcher',
 'RespChargesDriver',
 'ResponseProperty',
 'SHG',
 'ScfGradientDriver',
 'ScfHessianDriver',
 'ScfRestrictedDriver',
 'ScfRestrictedOpenDriver',
 'ScfUnrestrictedDriver',
 'Seminario',
 'ShgDriver',
 'SmdDriver',
 'SolvationBuilder',
 'SolvationFepDriver',
 'SubCommunicators',
 'SubMatrix',
 'SymmetryAnalyzer',
 'T3FlatBuffer',
 'T4CScreener',
 'TPA',
 'TdaEigenSolver',
 'TddftGradientDriver',
 'TddftOrbitalResponse',
 'TdhfHessianDriver',
 'ThreeCenterElectronRepulsionDriver',
 'ThreeCenterElectronRepulsionGeom010Driver',
 'ThreeCenterElectronRepulsionGeom100Driver',
 'ThreeCenterOverlapDriver',
 'ThreePATransitionDriver',
 'TpaFullDriver',
 'TpaReducedDriver',
 'TpaTransitionDriver',
 'TransitionStateGuesser',
 'TwoCenterElectronRepulsionDriver',
 'TwoCenterElectronRepulsionGeom100Driver',
 'VibrationalAnalysis',
 'VisualizationDriver',
 'XCFunctional',
 'XCIntegrator',
 'XCMolecularGradient',
 'XtbDriver',
 'XtbGradientDriver',
 'XtbHessianDriver',
 '__builtins__',
 '__cached__',
 '__doc__',
 '__file__',
 '__loader__',
 '__name__',
 '__package__',
 '__path__',
 '__spec__',
 '__version__',
 'aodensitymatrix',
 'aoindices',
 'assert_msg_critical',
 'atombdedriver',
 'atomtypeidentifier',
 'available_functionals',
 'available_pdft_functionals',
 'batchsize',
 'blockdavidson',
 'bohr_in_angstrom',
 'c2diis',
 'c6driver',
 'checkpoint',
 'chemical_element_identifier',
 'chemical_element_label',
 'chemical_element_mass',
 'chemical_element_max_angular_momentum',
 'chemical_element_name',
 'compute_angular_momentum_integrals',
 'compute_electric_dipole_integrals',
 'compute_kinetic_energy_integrals',
 'compute_linear_momentum_integrals',
 'compute_nuclear_potential_integrals',
 'compute_overlap_integrals',
 'configure_mkl_rt',
 'conformergenerator',
 'cpcmdriver',
 'cphfsolver',
 'cppsolver',
 'cubicgrid',
 'cubicresponsedriver',
 'denmat',
 'densityviewer',
 'dftutils',
 'dipole_in_debye',
 'dispersionmodel',
 'distributedarray',
 'doubleresbeta',
 'environment',
 'errorhandler',
 'evbdataprocessing',
 'evbdriver',
 'evbfepdriver',
 'evbreporter',
 'evbsystembuilder',
 'excitedstateanalysisdriver',
 'excitondriver',
 'extinction_coefficient_from_beta',
 'features',
 'fine_structure_constant',
 'firstorderprop',
 'fockdriver',
 'get_basis_path',
 'get_data_path',
 'gradientdriver',
 'griddriver',
 'hartree_in_ev',
 'hartree_in_kcalpermol',
 'hartree_in_kjpermol',
 'hartree_in_wavenumber',
 'hartree_in_wavenumbers',
 'hessiandriver',
 'hessianorbitalresponse',
 'imdatabasepointcollecter',
 'imforcefieldgenerator',
 'inputparser',
 'interpolationdatapoint',
 'interpolationdriver',
 'is_chemical_element',
 'linearsolver',
 'lreigensolver',
 'lrsolver',
 'make_matrices',
 'make_matrix',
 'mat_t',
 'matrices',
 'matrix',
 'mklconf',
 'mmdriver',
 'mmforcefieldgenerator',
 'mmgradientdriver',
 'mofbuilder',
 'mofmdprepare',
 'mofoptimizer',
 'mofpreparer',
 'mofutils',
 'mointsdriver',
 'molecularbasis',
 'molecularorbitals',
 'molecule',
 'molorb',
 'mp2driver',
 'mpi_master',
 'mpitask',
 'nonlinearsolver',
 'numerovdriver',
 'oneeints',
 'openmmdriver',
 'openmmdynamics',
 'openmmgradientdriver',
 'optimizationdriver',
 'optimizationengine',
 'orbitalviewer',
 'outputstream',
 'parse_xc_func',
 'partition_atoms',
 'peforcefieldgenerator',
 'polarizabilitygradient',
 'polorbitalresponse',
 'print_features',
 'profiler',
 'pubchemfetcher',
 'quadraticresponsedriver',
 'reactionmatcher',
 'read_results',
 'reaffbuilder',
 'respchargesdriver',
 'rifockdriver',
 'rotatory_strength_in_cgs',
 'rspabsorption',
 'rspc6',
 'rspcdspec',
 'rsplinabscross',
 'rsppolarizability',
 'rspproperty',
 'rspshg',
 'rsptpa',
 'sadguessdriver',
 'sanitychecks',
 'scfdriver',
 'scfgradientdriver',
 'scfhessiandriver',
 'scfrestdriver',
 'scfrestopendriver',
 'scfunrestdriver',
 'seminario',
 'set_omp_num_threads',
 'set_vlxbasispath',
 'set_vlxdatapath',
 'shgdriver',
 'smddriver',
 'smdsolventproperties',
 'solvationbuilder',
 'solvationfepdriver',
 'subcommunicators',
 'symmetryanalyzer',
 'symmetryoperations',
 'tdacppsolver',
 'tdaeigensolver',
 'tddftgradientdriver',
 'tddftorbitalresponse',
 'tdhfhessiandriver',
 'threepatransitiondriver',
 'tmparameters',
 'tpadriver',
 'tpafulldriver',
 'tpareddriver',
 'tpatransitiondriver',
 'tsguesser',
 'uffparameters',
 'veloxchemlib',
 'vibrationalanalysis',
 'visualizationdriver',
 'waterparameters',
 'xtbdriver',
 'xtbgradientdriver',
 'xtbhessiandriver']

Information about a specific class is available from the docstring.

print(vlx.ScfUnrestrictedDriver.__doc__)
Implements spin unrestricted open shell SCF method with C2-DIIS and
two-level C2-DIIS convergence accelerators.

:param comm:
    The MPI communicator.
:param ostream:
    The output stream.

Methods and properties#

The actual calculations are performed by the methods in the classes. To list the properties and methods of a class, the dir function can be used as follows.

dir(vlx.ScfRestrictedDriver)
['__class__',
 '__deepcopy__',
 '__delattr__',
 '__dict__',
 '__dir__',
 '__doc__',
 '__eq__',
 '__firstlineno__',
 '__format__',
 '__ge__',
 '__getattribute__',
 '__getstate__',
 '__gt__',
 '__hash__',
 '__init__',
 '__init_subclass__',
 '__le__',
 '__lt__',
 '__module__',
 '__ne__',
 '__new__',
 '__reduce__',
 '__reduce_ex__',
 '__repr__',
 '__setattr__',
 '__sizeof__',
 '__static_attributes__',
 '__str__',
 '__subclasshook__',
 '__weakref__',
 '_apply_mom',
 '_check_convergence',
 '_comp_2e_fock',
 '_comp_2e_fock_single_comm',
 '_comp_density_change',
 '_comp_diis',
 '_comp_energy',
 '_comp_full_fock',
 '_comp_gradient',
 '_comp_npot_mat_parallel',
 '_comp_number_of_electrons',
 '_comp_one_ints',
 '_delete_mos',
 '_gen_molecular_orbitals',
 '_get_acc_type',
 '_get_dyn_threshold',
 '_get_effective_fock',
 '_get_guess_type',
 '_get_scaled_fock',
 '_get_scf_range',
 '_graceful_exit',
 '_need_graceful_exit',
 '_print_energy_components',
 '_print_ground_state',
 '_print_header',
 '_print_iter_data',
 '_print_scf_energy',
 '_print_scf_finish',
 '_print_scf_title',
 '_store_diis_data',
 '_update_mol_orbs_phase',
 '_write_final_hdf5',
 'comm',
 'compute',
 'compute_s2',
 'density',
 'gen_initial_density_proj',
 'gen_initial_density_restart',
 'gen_initial_density_sad',
 'get_scf_energy',
 'get_scf_type_str',
 'history',
 'is_converged',
 'maximum_overlap',
 'mol_orbs',
 'molecular_orbitals',
 'nnodes',
 'nodes',
 'num_iter',
 'ostream',
 'print_attributes',
 'print_keywords',
 'rank',
 'scf_energy',
 'scf_results',
 'scf_tensors',
 'scf_type',
 'set_start_orbitals',
 'update_settings',
 'validate_checkpoint',
 'write_checkpoint']