qmcblip.champio module

Functions and classes for CHAMP I/O.

class qmcblip.champio.Settings(*, general: qmcblip.champio.Settings.General, molecule: pathlib.Path, basis_num_info: pydantic.types.FilePath, determinants: pydantic.types.FilePath, orbitals: pydantic.types.FilePath, jastrow: pydantic.types.FilePath, jastrow_der: pydantic.types.FilePath, symmetry: pydantic.types.FilePath = None, ase: qmcblip.champio.Settings.Ase = Ase(iase=1, iforce_analy=0, node_cutoff=1, enode_cutoff=0.05), electrons: qmcblip.champio.Settings.Electrons, optwf: qmcblip.champio.Settings.Optwf = Optwf(ioptwf=1, ioptci=1, ioptjas=1, ioptorb=1, nextorb=100, no_active=1, nopt_iter=1, isample_cmat=0, energy_tol=0.0), pseudo: qmcblip.champio.Settings.Pseudo = Pseudo(nloc=4, nquad=6), blocking_vmc: qmcblip.champio.Settings.BlockingVmc = BlockingVmc(vmc_nstep=20, vmc_nblk=400, vmc_nblkeq=1, vmc_nconf_new=0), **extra_data: Any)[source]

Bases: pydantic.main.BaseModel

Data class containing CHAMP configuration.

This class can hold the neccessery configuration to run CHAMP.

class General(*, title: str, pool: pydantic.types.DirectoryPath = PosixPath('pool'), basis: str, pseudopot: str = None, mode: str = 'vmc_one_mpi1', seed: int = 1837465927472523, eunit: str = 'Hartrees', **extra_data: Any)[source]

Bases: pydantic.main.BaseModel

General module class.

title: str

title of the simulation.

Type

str

pool: pydantic.types.DirectoryPath

location of the pool directory.

Type

path, optional

basis: str

basis to use (located in pool).

Type

str

pseudopot: Optional[str]

pseudopotential to use.

Type

str, optional

mode: str

QMC mode.

Type

str, optional

seed: int

seed for CHAMP.

Type

int, optional

eunit: str

energy units.

Type

str, optional

class Ase(*, iase: int = 1, iforce_analy: int = 0, node_cutoff: int = 1, enode_cutoff: float = 0.05, **extra_data: Any)[source]

Bases: pydantic.main.BaseModel

ASE module class.

iase: int
iforce_analy: int
node_cutoff: int
enode_cutoff: float
class Electrons(*, nup: int, nelec: int, **extra_data: Any)[source]

Bases: pydantic.main.BaseModel

Electrons module class.

nup: int

amount of electrons with upspin.

Type

int

nelec: int

total amount of electrons.

Type

int

class Optwf(*, ioptwf: int = 1, ioptci: int = 1, ioptjas: int = 1, ioptorb: int = 1, nextorb: int = 100, no_active: int = 1, nopt_iter: int = 1, isample_cmat: int = 0, energy_tol: float = 0.0, **extra_data: Any)[source]

Bases: pydantic.main.BaseModel

Wavefunction optimization module class.

ioptwf: int
ioptci: int
ioptjas: int
ioptorb: int
nextorb: int
no_active: int
nopt_iter: int
isample_cmat: int
energy_tol: float
class BlockingVmc(*, vmc_nstep: int = 20, vmc_nblk: int = 400, vmc_nblkeq: int = 1, vmc_nconf_new: int = 0, **extra_data: Any)[source]

Bases: pydantic.main.BaseModel

VMC module class.

vmc_nstep: int
vmc_nblk: int
vmc_nblkeq: int
vmc_nconf_new: int
class Pseudo(*, nloc: int = 4, nquad: int = 6, **extra_data: Any)[source]

Bases: pydantic.main.BaseModel

Pseudopotential module class.

nloc: int
nquad: int
general: qmcblip.champio.Settings.General
molecule: pathlib.Path

path to molecule geometry.

Type

path

basis_num_info: pydantic.types.FilePath

path to basis info.

Type

path

determinants: pydantic.types.FilePath

path to the determinants file.

Type

path

orbitals: pydantic.types.FilePath

path to the orbitals file.

Type

path

jastrow: pydantic.types.FilePath

path to the jastrow file.

Type

path

jastrow_der: pydantic.types.FilePath

path to the jastrow derivatives file.

Type

path

symmetry: Optional[pydantic.types.FilePath]

path to the symmetry file.

Type

optional

ase: qmcblip.champio.Settings.Ase
electrons: qmcblip.champio.Settings.Electrons
optwf: qmcblip.champio.Settings.Optwf
pseudo: qmcblip.champio.Settings.Pseudo
blocking_vmc: qmcblip.champio.Settings.BlockingVmc
write(filename='vmc.inp')[source]

Write a this dataclass containing the CHAMP configuration to an input file.

Parameters

filename (str, optional) – input file to write to.

classmethod read(filename: Union[str, pathlib.Path]) pydantic.main.BaseModel[source]

Read the CHAMP input file and convert it to a dictionary format

Parameters

filename (str, optional) – file of the input file to read and write to.

Returns

Settings object containing CHAMP configuration.

Return type

Settings

use_opt_wf()[source]

Function to replace the orbitals, determinants and jastrow with the optimized files.

todict()[source]

Return a dictionary of the class.

Returns

json dictionary.

Return type

str

qmcblip.champio.cleanup(*args)[source]

Remove files created by CHAMP.

This function can cleanup the directory of the simulation. Add files as arguments to include (if not in default list) or exclude (if in default list) files.

Parameters

*args – filesnames to include (if not in default list) or exclude (if in default list).