mech2d.calculation package

Submodules

mech2d.calculation.calculator module

class mech2d.calculation.calculator.Calculator[source]

Bases: object

Methods

get_energy()

This method must be implemented by child classes, it parse of output data.

set_inputs()

This method must be implemented by child classes, it should write all the input files and prepare environment for execution

abstract get_energy()[source]

This method must be implemented by child classes, it parse of output data.

Returns

None

abstract set_inputs()[source]

This method must be implemented by child classes, it should write all the input files and prepare environment for execution

Returns

None

mech2d.calculation.runtask module

class mech2d.calculation.runtask.RunTasks(rootdir, structures, code)[source]

Bases: object

Methods

preprocess

run

preprocess()[source]
run(task_dict, machine, resources)[source]
mech2d.calculation.runtask.run_elastic(args)[source]

mech2d.calculation.vasp module

class mech2d.calculation.vasp.VASP(inputdir, structure, incar=None, kpoints=None, potcar=None, structure_fmt='POSCAR', outputdir=None, params=None)[source]

Bases: mech2d.calculation.calculator.Calculator, monty.json.MSONable

Methods

as_dict()

A JSON serializable dict representation of an object.

from_dict(d)

param d

Dict representation.

get_energy(outputdir)

This method must be implemented by child classes, it parse of output data.

set_inputs()

This method must be implemented by child classes, it should write all the input files and prepare environment for execution

to_json()

Returns a json string representation of the MSONable object.

unsafe_hash()

Returns an hash of the current object.

validate_monty(v)

pydantic Validator for MSONable pattern

get_stress

static get_energy(outputdir)[source]

This method must be implemented by child classes, it parse of output data.

Returns

None

static get_stress(outputdir)[source]
name = 'VASP'
set_inputs()[source]

This method must be implemented by child classes, it should write all the input files and prepare environment for execution

Returns

None

mech2d.calculation.vasp.get_kpoints(struct, kspacing, kgamma, twod=True)[source]
mech2d.calculation.vasp.test()[source]