jarvis.tasks.vasp.vasp

Modules for high-throughput VASP calculations.

Module Contents

Classes

JobFactory

Provide sets of VASP calculations.

VaspJob

Construct a VASP calculation job.

GenericIncars

Construct class containing severalgeneric Incar object.

Functions

write_vaspjob([pyname, job_json])

Write template job.py with VaspJob.to_dict() job.json.

write_jobfact([pyname, job_json, input_arg])

Write template job.py with JobFactory.to_dict() job.json.

write_jobfact_optb88vdw([pyname, job_json])

Write template job.py with JobFactory.to_dict() job.json.

jarvis.tasks.vasp.vasp.write_vaspjob(pyname='job.py', job_json='')[source]

Write template job.py with VaspJob.to_dict() job.json.

jarvis.tasks.vasp.vasp.write_jobfact(pyname='job.py', job_json='', input_arg='v.soc_spillage()\n')[source]

Write template job.py with JobFactory.to_dict() job.json.

jarvis.tasks.vasp.vasp.write_jobfact_optb88vdw(pyname='job.py', job_json='')[source]

Write template job.py with JobFactory.to_dict() job.json.

class jarvis.tasks.vasp.vasp.JobFactory(name='Jobs', poscar=None, use_incar_dict={}, vasp_cmd='', pot_type='POT_GGA_PAW_PBE', copy_files=[], attempts=5, stderr_file='std_err.txt', output_file='vasp.out', optional_params={'kppa': 1000, 'extension': 'SCAN', 'encut': 500, 'kpleng': 20, 'line_density': 20, 'wann_cmd': '~/bin/wannier90.x wannier90', 'wt_cmd': '~/bin/wt.x', 'run_wannier': True, 'ldau': False, 'Uval': 2.0}, steps=['ENCUT', 'KPLEN', 'RELAX', 'BANDSTRUCT', 'LOPTICS', 'MBJOPTICS', 'ELASTIC', 'SPILLAGE', 'EFG', 'MAGORDER', 'DFPT', 'RAMANINTS', 'SHG'])[source]

Bases: object

Provide sets of VASP calculations.

step_flow()[source]

Asiimilate number of steps as legos for a workflow.

all_optb88vdw_calcs()[source]

Use for OptB88vdW based HT.

all_pbe_calcs()[source]

Use for PBE based HT.

all_scan_calcs()[source]

Use for SCAN based HT.

all_lda_calcs()[source]

Use for LDA based HT.

workflow(generic_incar='')[source]

Use for functional based high-throughput calculations.

This will converge k-points, cut-offs, and then carry several property calculations. Args:

mat : Poscar object

magorder(min_configs=3, length=20)[source]

Determine structures for FM, AFM, FiM magnetic ordering.

elastic(mat=None, encut=None, nbands=None, potim=0.015, npar=None, length=20)[source]

Use for elastic property calculations using IBRION = 6.

Enforces conventional standard structure.

Args:

mat : Poscar object

encut : Plane-wave cut-off, 1.3 times will be used

nbands : number of bands, generally high-value recommended

npar : NPAR tag, see VASP manual, set it as number of cores

length : K-points in length unit

efg(mat=None, encut=None, nbands=None, length=20)[source]

Use for electric field gradient calculation.

Args:

mat : Poscar object

encut : Plane-wave cut-off, 1.3 times will be used

nbands : number of bands, increased to threee times

length : K-points in length unit

dfpt(mat=None, encut=None, nbands=None, length=20)[source]

Use for density functional perturbation theory calculation.

Args:

mat : Poscar object

encut : Plane-wave cut-off, 1.3 times will be used

nbands : number of bands, increased to threee times

length : K-points in length unit

mbj_loptics(mat=None, encut=None, nbands=None, length=20)[source]

Use for TBmBJ meta-GGA calculation.

Args:

mat : Poscar object

encut : Plane-wave cut-off, 1.3 times will be used

nbands : number of bands, increased to threee times

length : K-points in length unit

soc_spillage(mat=None, encut=None, nbands=None, kppa=1000, leng=None)[source]

Use for SOC spillage calculation.

Args:

mat : Poscar object

encut : Plane-wave cut-off, 1.3 times will be used

nbands : number of bands, increased to threee times

kppa : K-points in kpoints per atom unit

loptics(mat=None, encut=None, nbands=None, length=20)[source]

Use in linear-optics calculations.

Args:

mat : Poscar object

encut : Plane-wave cut-off, 1.3 times will be used

nbands : number of bands, increased to threee times

length : K-points in length unit

band_structure(mat=None, encut=None, line_density=20, nbands=None, copy_prev_chgcar=None)[source]

Use in band-structure calculations.

Args:

mat : Poscar object

encut : Plane-wave cut-off, 1.3 times will be used

nbands : number of bands, increased to threee times

line_densitynumber of k-points between two

high-symmetry k-points

copy_prev_chgcar : path of CHGCAR file for Non-SCF step

optimize_geometry(mat=None, encut=None, length=None)[source]

Use in optimizing lattice-parameter and internal psotions.

Args:

mat : Poscar object

encut : Plane-wave cut-off

length : K-points in length unit

converg_encut(encut=500, mat=None, starting_length=10, tol=0.001)[source]

Provide function to converg plane-wave cut-off.

Args:

encut: intial cutoff

mat: Poscar object

Returns:

encut: converged cut-off

converg_kpoint(length=0, mat=None, encut=500, tol=0.001)[source]

Provide function to converg K-points.

Args:

lenght: K-point line density

mat: Poscar object with structure information

Returns:

length1: K-point line density

classmethod from_dict(d={})[source]

Load from dictionary.

to_dict()[source]

Convert to dictionary.

class jarvis.tasks.vasp.vasp.VaspJob(poscar=None, kpoints=None, incar=None, potcar=None, vasp_cmd='mpirun vasp_std', output_file='vasp.out', stderr_file='std_err.txt', jobname='test', pot_type=None, copy_files=['/users/knc6/bin/vdw_kernel.bindat'], attempts=5)[source]

Bases: object

Construct a VASP calculation job.

run()[source]

Use subprocess to tun a job.

write_jobsub_py(filename='jobsub.py')[source]

Write a generic python file for running jobs.

to_dict()[source]

Convert the class into a dictionary.

classmethod from_dict(info={})[source]

Load the class from a dictionary.

runjob()[source]

Provide main function for running a generic VASP calculation.

class jarvis.tasks.vasp.vasp.GenericIncars(name='', incar={}, pot_type='')[source]

Bases: object

Construct class containing severalgeneric Incar object.

For different psuedopotentials

optb88vdw()[source]

Select OptB88vdW functional.

pbe()[source]

Select GGA-PBE functional.

scan()[source]

Select GGA-PBE functional.

r2scan()[source]

Select GGA-PBE functional.

hse06()[source]

Select HSE06 functional.

lda()[source]

Select LDA functional.