pychemia.code.vasp package

Module for VASP

The Vienna Ab initio Simulation Package (VASP) is a computer program for atomic scale materials modelling, e.g. electronic structure calculations and quantum-mechanical molecular dynamics, from first principles.

https://www.vasp.at/

Submodules

pychemia.code.vasp.doscar module

class pychemia.code.vasp.doscar.VaspDoscar(filename='DOSCAR')[source]

Bases: object

static parse_doscar(filename)[source]

pychemia.code.vasp.incar module

class pychemia.code.vasp.incar.InputVariables(filename=None, variables=None)[source]

Bases: collections.abc.MutableMapping

VASP INCAR object

It contains:

data:
variables = Dictionary whose keys are ABINIT variable names
and contains the values as numpy arrays
methods:
write = Write the input into as a text file that ABINIT
can use as an input file

get_value = Get the value of a particular variable set_value = Set the value of a particular variable

get_defined_variables()[source]
set_density_for_restart()[source]
set_electron_scf(NELM=60, NELMIN=2, EDIFF=0.0001, IALGO=48)[source]
set_encut(ENCUT=300, POTCAR=None)[source]
set_ion_relax(NSW=50, ISIF=2, IBRION=2, EDIFFG=-0.001)[source]
set_ismear(kpoints)[source]
set_minimum(PREC='Normal', ISPIN=2, LREAL=False, ISMEAR=0, LORBIT=11)[source]
set_mit_settings()[source]
set_rough_relaxation()[source]
write(filename='INCAR')[source]

Write an inputvars object into a text file that VASP can use as an INCAR file

Args:
filename:
The path to ‘INCAR’ filename that will be written
write_key(varname)[source]

Receives an input variable and write their contents properly according with their kind and length

Args:
varname:
The name of the input variable
pychemia.code.vasp.incar.read_incar(filename='INCAR')[source]

Load the file INCAR in the directory ‘path’ or read directly the file ‘path’ and return an object ‘inputvars’ for pychemia

Parameters:filename – (str) Filename of a INCAR file format
Returns:
pychemia.code.vasp.incar.write_incar(iv, filepath='INCAR')[source]

Takes an object inputvars from pychemia and save the file INCAR in the directory ‘path’ or save the file ‘path’ as a VASP INCAR file

Parameters:
  • iv – (InputVariables) VASP Input variables
  • filepath – (str) File path to write the INCAR file

pychemia.code.vasp.kpoints module

pychemia.code.vasp.kpoints.read_kpoints(path='KPOINTS')[source]

Load the file KPOINTS in the directory ‘path’ or read directly the file ‘path’ and return a kpoints object for pychemia

Parameters:path – (str) File path for KPOINTS file
Returns:
pychemia.code.vasp.kpoints.write_kpoints(kp, filepath='KPOINTS')[source]

Takes an object kpoints from pychemia and save the file KPOINTS in the directory ‘path’ or save the file ‘path’ as a VASP KPOINTS file

Parameters:
  • kp – Kpoints object
  • filepath – (str) Filename where the KPOINTS file is created

pychemia.code.vasp.outcar module

class pychemia.code.vasp.outcar.VaspOutput(filename='OUTCAR')[source]

Bases: object

energy
free_energy()[source]
get_general_timing()[source]
get_magnetization()[source]
get_memory_used()[source]
has_forces_stress_energy()[source]
is_finished
iterations()[source]
outcar_parser()[source]
relaxation_info()[source]
reload()[source]
to_dict
pychemia.code.vasp.outcar.read_vasp_stdout(filename)[source]

pychemia.code.vasp.poscar module

pychemia.code.vasp.poscar.get_potcar_info(filename='POTCAR')[source]
pychemia.code.vasp.poscar.get_species(path)[source]
pychemia.code.vasp.poscar.get_species_list(structure)[source]
pychemia.code.vasp.poscar.read_poscar(path='POSCAR')[source]

Load a POSCAR file and return a pychemia structure object

Parameters:path – (str) Path to a POSCAR file or a directory where a file named ‘POSCAR’ is located
Returns:
pychemia.code.vasp.poscar.write_poscar(structure, filepath='POSCAR', newformat=True, direct=True)[source]

Takes an structure from pychemia and save the file POSCAR for VASP.

Parameters:
  • structure – (pychemia.Structure) Structure to write POSCAR
  • filepath – (str) Filename of POSCAR file to create
  • newformat – (bool) If the new VASP format is used to create the POSCAR
  • direct – (bool) If True, use reduced coordinates. If False, use cartesian coordinates (default: True)
pychemia.code.vasp.poscar.write_potcar(structure, filepath='POTCAR', pspdir='potpaw_PBE', options=None, pspfiles=None, basepsp=None)[source]

pychemia.code.vasp.queue module

pychemia.code.vasp.queue.write_from_queue(queue, entry_id, destination=None)[source]

pychemia.code.vasp.vasp module

class pychemia.code.vasp.vasp.VaspAnalyser(workdir)[source]

Bases: object

files_presence()[source]
run()[source]
class pychemia.code.vasp.vasp.VaspJob[source]

Bases: pychemia.code.codes.Codes

clean()[source]
finalize()[source]
fromdict(vj_dict)[source]
get_outputs()[source]
initialize(structure, workdir='.', kpoints=None, binary='vasp')[source]
job_static()[source]
load_json(filename)[source]
read_incar()[source]
read_kpoints()[source]
read_poscar()[source]
save_json(filename)[source]
set_input_variables(input_variables)[source]
set_inputs()[source]
set_kpoints(kpoints)[source]
to_dict
update()[source]
variables
write_incar()[source]
write_kpoints()[source]
write_poscar()[source]
write_potcar()[source]