qmcblip package
QMCblip
- class qmcblip.CHAMP(restart=None, ignore_bad_restart_file=<object object>, label='CHAMP', atoms=None, **kwargs)[source]
Bases:
ase.calculators.calculator.FileIOCalculatorASE 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
- 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.
- 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.BaseModelData 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.BaseModelGeneral module class.
- 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.BaseModelASE module class.
- class Electrons(*, nup: int, nelec: int, **extra_data: Any)[source]
Bases:
pydantic.main.BaseModelElectrons module class.
- 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.BaseModelWavefunction optimization module class.
- 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.BaseModelVMC module class.
- class Pseudo(*, nloc: int = 4, nquad: int = 6, **extra_data: Any)[source]
Bases:
pydantic.main.BaseModelPseudopotential module class.
- general: qmcblip.champio.Settings.General
- molecule: pathlib.Path
path to molecule geometry.
- Type
- symmetry: Optional[pydantic.types.FilePath]
path to the symmetry file.
- Type
optional
- electrons: qmcblip.champio.Settings.Electrons
- 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
- 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.