remainder=ncore_per_kpoint_dft%ncore_per_kpoint_chi fw1_task1=ScriptTask.from_str("pwd") fw1=VaspFirework(fw1_task1,name=mname) # standard DFT first vasp1=VaspInputInterface(s) nelect=vasp1.get_nelect() nbands=nelect*3/2 remainder=nbands%ncore_per_kpoint_dft add=ncore_per_kpoint_dft-remainder nbands=int(nbands+add) vasp1.ALGO='Normal' vasp1.KPAR=kpar_dft vasp1.NBANDS=nbands vasp1.NEDOS=4096 vasp1.kpts_style='Gamma' vasp1.kpts=[6,6,6] vasp1.kpts_shift=[0,0,0] fw1.add_task(vasp1) fw1.add_handler('FrozenJobErrorHandler') fw1_task2=ScriptTask.from_str("pwd; mkdir OrbDir") fw1_task3=ScriptTask.from_str("mv CHG* CONTCAR DOSCAR EIGENVAL I* K* OSZICAR OUTCAR P* W* X* vasp* OrbDir") fw1_task4=ScriptTask.from_str("cp OrbDir/WAVECAR . ; cp OrbDir/CONTCAR .") fw1.add_task(fw1_task2) fw1.add_task(fw1_task3) fw1.add_task(fw1_task4) # create VASP IPA LOPTICS input job yaml file
import os import sys import string import json import inspect from pymatgen import Structure from fireworks import Firework, Workflow, LaunchPad from pymatgen.io.vasp.interfaces import VaspInputInterface, VaspFirework, VaspWorkflow # get structure from Crystallographic Information File (CIF) s = Structure.from_file('./mp-33088_Cr2FeO4.cif') input=VaspInputInterface(s) input.NEDOS=2000 # override default or add INCAR parameter # Dump VASP Input into current directory for inspection input.write_input() # Complete definition of Firework Task(s) and add to # Firework task=VaspFirework(input) # Save specification to yaml file for later inspection # or manual add to launchpad with lpad script task.to_file("simple_task.yaml") # Adds single Firework to launchpad database task.add_fw_to_launchpad()