matador.calculators package

The calculator module contains classes for use as DFT/atomistic calculators within the compute module class.

class matador.calculators.CastepCalculator(calculation_parameters)[source]

Bases: Calculator

The CASTEP calculator.

static verify_calculation_parameters(calculation_parameters, structure)[source]

Verify if the parameters passed make sense for this calculator. Mutates the input dict if required.

Parameters:
  • calculation_parameters (dict) – contains global parameters, i.e. non-structure-specific parameters.

  • structure (dict) – contains the structure.

Raises:

InputError – if verification fails, with a (hopefully) helpful message.

static verify_simulation_cell(structure)[source]

Run some checks on the structure.

Parameters:

structure (dict) – dictionary containing the structure.

Raises:

CalculationError – if cell is pathological.

do_memcheck()[source]

If possible, do a dryrun of the code to estimate memory usage.

Returns:

estimated memory usage in MB. 0 if method not implemented.

Return type:

int

Submodules

matador.calculators.ase module

matador.calculators.calculator module

This file implements the abstract Calculator class for use with compute.

class matador.calculators.calculator.Calculator(calculation_parameters)[source]

Bases: object

Base class for Calculator objects, with some useful methods and abstract methods.

abstract static verify_calculation_parameters(calculation_parameters, structure)[source]

Verify if the parameters passed make sense for this calculator. Mutates the input dict if required.

Parameters:
  • calculation_parameters (dict) – contains global parameters, i.e. non-structure-specific parameters.

  • structure (dict) – contains the structure.

Raises:

InputError – if verification fails, with a (hopefully) helpful message.

static verify_simulation_cell(structure)[source]

Run some checks on the structure.

Parameters:

structure (dict) – dictionary containing the structure.

Raises:

CalculationError – if cell is pathological.

do_memcheck()[source]

If possible, do a dryrun of the code to estimate memory usage.

Returns:

estimated memory usage in MB. 0 if method not implemented.

Return type:

int

matador.calculators.castep module

This file implements the CastepCalculator class for use with the compute module.

class matador.calculators.castep.CastepCalculator(calculation_parameters)[source]

Bases: Calculator

The CASTEP calculator.

static verify_calculation_parameters(calculation_parameters, structure)[source]

Verify if the parameters passed make sense for this calculator. Mutates the input dict if required.

Parameters:
  • calculation_parameters (dict) – contains global parameters, i.e. non-structure-specific parameters.

  • structure (dict) – contains the structure.

Raises:

InputError – if verification fails, with a (hopefully) helpful message.

static verify_simulation_cell(structure)[source]

Run some checks on the structure.

Parameters:

structure (dict) – dictionary containing the structure.

Raises:

CalculationError – if cell is pathological.

do_memcheck()[source]

If possible, do a dryrun of the code to estimate memory usage.

Returns:

estimated memory usage in MB. 0 if method not implemented.

Return type:

int

matador.calculators.quantum_espresso module