qmcblip package

QMCblip

class qmcblip.CHAMP(restart=None, ignore_bad_restart_file=<object object>, label='CHAMP', atoms=None, **kwargs)[source]

Bases: ase.calculators.calculator.FileIOCalculator

ASE Calculator for CHAMP.

An ASE calculator for the Quantum Monte Carlo software CHAMP.

Parameters
  • vmc_in (str, optional) – File to read CHAMP settings from.

  • vmc_out (str, optional) – The output file of CHAMP.

  • force_file (str, optional) – The file that CHAMP writes the forces and energies to.

  • pos_file (str, optional) – The file from which CHAMP will read to location of the atoms.

  • champ_loc (str, optional) – Location of the CHAMP executable.

  • nodefile (str, optional) – If set, the calculator will run on multiple nodes for CHAMP.

  • ncore (str, optional) – Amount of cores to run CHAMP on.

  • settings (Settings, optional) – Input settings for CHAMP (OVERRULES VMC.INP).

  • use_opt_wf (bool, optional) – Use the optimized WF from last step.

implemented_properties: List[str] = ['energy', 'forces', 'stress']

Properties calculator can handle (energy, forces, …)

name = 'CHAMP'
default_parameters: Dict[str, Any] = {'champ_loc': '/usr/bin/vmc.mov1', 'force_file': 'write_forces', 'ncore': 1, 'nodefile': None, 'pos_file': 'molecule.xyz', 'settings': None, 'use_opt_wf': False, 'vmc_in': 'vmc.inp', 'vmc_out': 'vmc.out'}

Default parameters

command: Optional[str] = ''

Command used to start calculation

configure(**kwargs)[source]

(Re)configure the CHAMP calculator by setting the keyword arguments.

The tags for the vmc.inp can also be set here.

Parameters

**kwargs – keyword arguments.

write_input(atoms, properties=None, system_changes=None)[source]

Write input file(s).

Call this method first in subclasses so that directories are created automatically.

read(label)[source]

Read atoms, parameters and calculated properties from output file.

Read result from self.label file. Raise ReadError if the file is not there. If the file is corrupted or contains an error message from the calculation, a ReadError should also be raised. In case of succes, these attributes must set:

atoms: Atoms object

The state of the atoms from last calculation.

parameters: Parameters object

The parameter dictionary.

results: dict

Calculated properties like energy and forces.

The FileIOCalculator.read() method will typically read atoms and parameters and get the results dict by calling the read_results() method.

read_results()[source]

Read energy, forces, … from output file(s).

class qmcblip.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.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).

qmcblip.traj_to_db(traj_file, db_file, append=False)[source]

Convert ASE trajectory file to database.

Additionally, the tag ‘relaxed’ is set to False.

Parameters
  • traj_file (Path) – trajectory filename.

  • db_file (Path) – database filename.

  • append (bool) – append to a current database if it exists. If database file does not exists this does nothing.

qmcblip.otf_to_db(otf_file, db_file, append=False)[source]

Convert FLARE OTF file to database.

Additionally, the tag ‘relaxed’ is set to False.

Parameters
  • otf_file (Path) – OTF filename.

  • db_file (Path) – database filename.

  • append (bool) – append to a current database if it exists. If database file does not exists this does nothing.

Subpackages

Submodules