Module ImportFrom alias alias Expr Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Set Str Str Str Str Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str Str NameLoad NameLoad Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Num If UnaryOpNot Call AttributeLoad Call NameLoad NameLoad attr NameLoad body For NameStore NameLoad body TryExcept body Assign NameStore Call NameLoad NameLoad AugAssignAdd NameStore Num handlers ExceptHandler body Pass If CompareNotEq NameLoad Num body Raise Call NameLoad Call AttributeLoad Str attr NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str If AttributeLoad NameLoad attr body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad Str attr NameLoad If AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr Str If UnaryOpNot BoolOpOr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str body If CompareIn Call AttributeLoad NameLoad attr Str ListLoad Num Num Num Num body Delete SubscriptDel NameLoad Index Str orelse Import alias Assign NameStore BoolOpOr Call AttributeLoad AttributeLoad NameLoad attr attr Str Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad For NameStore Call NameLoad Call NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad body If CompareEq BinOpMod NameLoad NameLoad Num body Assign SubscriptStore NameLoad Index Str NameLoad Break Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler body Pass If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad Call NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore SubscriptLoad NameLoad Index Str If BoolOpAnd CompareEq AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr CompareEq Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num TupleLoad Num Num Num body If BoolOpAnd CompareIsNot AttributeLoad NameLoad attr NameLoad Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body Assign NameStore AttributeLoad NameLoad attr orelse If Call NameLoad BinOpAdd SubscriptLoad NameLoad Index Num Str body AugAssignAdd SubscriptStore NameLoad Index Num Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr Call AttributeLoad Str attr NameLoad With Call NameLoad AttributeLoad NameLoad attr Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore BinOpAdd NameLoad ListLoad AttributeLoad NameLoad attr body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body If BoolOpAnd AttributeLoad NameLoad attr CompareNotEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad Str attr NameLoad AttributeLoad NameLoad attr orelse If CompareNotEq AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad Str attr NameLoad AttributeLoad NameLoad attr If BoolOpAnd AttributeLoad NameLoad attr UnaryOpNot AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call NameLoad Str Assign NameStore ListComp SubscriptLoad NameLoad Index Str comprehension NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Assign SubscriptStore NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Return ListLoad Call NameLoad NameLoad keyword NameLoad keyword Str keyword NameLoad Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword Str keyword NameLoad keyword ListLoad Dict Str Str Str Dict Str Dict Str Num Dict Str Str Str Dict Str Dict Str Str decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num Num body Expr Str For NameStore Call NameLoad NameLoad body If CompareEq NameLoad Num body Assign NameStore NameLoad Assign NameStore NameLoad orelse Assign NameStore NameLoad Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Str attr Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Str attr Assign NameStore BinOpDiv BinOpSub AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str BinOpMult NameLoad Num If CompareLt Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Break orelse Assign NameStore ListLoad Dict Str Str Str Dict Str Dict Str Num Dict Str Str Str Dict Str Dict Str Str Expr Call AttributeLoad NameLoad attr BinOpMod Str BinOpAdd NameLoad Num Expr Yield Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword BinOpMod Str BinOpAdd NameLoad Num keyword NameLoad keyword NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Call AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str AttributeLoad AttributeLoad NameLoad attr attr Assign SubscriptStore NameLoad Index Str AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call NameLoad attr SubscriptLoad NameLoad Index Str Return Call NameLoad keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword NameLoad keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str decorator_list NameLoad decorator_list
N/A __future__ unicode_literals division N/A 
This module implements basic kinds of jobs for VASP runs.
 N/A __author__ Shyue Ping Ong N/A __version__ 0.1 N/A __maintainer__ Shyue Ping Ong N/A __email__ shyuep@gmail.com N/A __status__ Beta N/A __date__ 2/4/13 N/A subprocess N/A os N/A shutil N/A math N/A logging pymatgen.io.vasp VaspInput Incar Poscar Outcar Kpoints pymatgen.io.smart read_structure pymatgen.io.vasp.sets MITVaspInputSet monty.json MontyDecoder monty.os.path which custodian.custodian Job custodian.vasp.interpreter VaspModder N/A VASP_INPUT_FILES N/A INCAR POSCAR POTCAR KPOINTS N/A VASP_OUTPUT_FILES N/A DOSCAR INCAR KPOINTS POSCAR PROCAR vasprun.xml CHGCAR CHG EIGENVAL OSZICAR WAVECAR CONTCAR IBZKPT OUTCAR VaspJob N/A Job N/A N/A 
    A basic vasp job. Just runs whatever is in the directory. But conceivably
    can be a complex processing of inputs etc. with initialization.
     __init__ N/A N/A self vasp_cmd output_file suffix final backup default_vasp_input_set auto_npar auto_gamma settings_override gamma_vasp_cmd copy_magmom N/A vasp.out True True N/A MITVaspInputSet True True None None False N/A N/A 
        This constructor is necessarily complex due to the need for
        flexibility. For standard kinds of runs, it's often better to use one
        of the static constructors. The defaults are usually fine too.

        Args:
            vasp_cmd (str): Command to run vasp as a list of args. For example,
                if you are using mpirun, it can be something like
                ["mpirun", "pvasp.5.2.11"]
            output_file (str): Name of file to direct standard out to.
                Defaults to "vasp.out".
            suffix (str): A suffix to be appended to the final output. E.g.,
                to rename all VASP output from say vasp.out to
                vasp.out.relax1, provide ".relax1" as the suffix.
            final (bool): Indicating whether this is the final vasp job in a
                series. Defaults to True.
            backup (bool): Whether to backup the initial input files. If True,
                the INCAR, KPOINTS, POSCAR and POTCAR will be copied with a
                ".orig" appended. Defaults to True.
            default_vasp_input_set (VaspInputSet): Species the default input
                set (see pymatgen's documentation in pymatgen.io.vasp.sets to
                use for directories that do not contain full set of VASP
                input files. For example, if a directory contains only a
                POSCAR or a cif, the vasp input set will be used to generate
                the necessary input files for the run. If the directory already
                contain a full set of VASP input files,
                this input is ignored. Defaults to the MITVaspInputSet.
            auto_npar (bool): Whether to automatically tune NPAR to be sqrt(
                number of cores) as recommended by VASP for DFT calculations.
                Generally, this results in significant speedups. Defaults to
                True. Set to False for HF, GW and RPA calculations.
            auto_gamma (bool): Whether to automatically check if run is a
                Gamma 1x1x1 run, and whether a Gamma optimized version of
                VASP exists with ".gamma" appended to the name of the VASP
                executable (typical setup in many systems). If so, run the
                gamma optimized version of VASP instead of regular VASP. You
                can also specify the gamma vasp command using the
                gamma_vasp_cmd argument if the command is named differently.
            settings_override ([dict]): An ansible style list of dict to
                override changes. For example, to set ISTART=1 for subsequent
                runs and to copy the CONTCAR to the POSCAR, you will provide::

                    [{"dict": "INCAR", "action": {"_set": {"ISTART": 1}}},
                     {"file": "CONTCAR",
                      "action": {"_file_copy": {"dest": "POSCAR"}}}]
            gamma_vasp_cmd (str): Command for gamma vasp version when
                auto_gamma is True. Should follow the list style of
                subprocess. Defaults to None, which means ".gamma" is added
                to the last argument of the standard vasp_cmd.
            copy_magmom (bool): Whether to copy the final magmom from the
                OUTCAR to the next INCAR. Useful for multi-relaxation runs
                where the CHGCAR and WAVECAR are sometimes deleted (due to
                changes in fft grid, etc.). Only applies to non-final runs.
         N/A N/A self vasp_cmd vasp_cmd N/A N/A self output_file output_file N/A N/A self final final N/A N/A self backup backup N/A N/A self default_vis default_vasp_input_set N/A N/A self suffix suffix N/A N/A self settings_override settings_override N/A N/A self auto_npar auto_npar N/A N/A self auto_gamma auto_gamma N/A N/A self gamma_vasp_cmd gamma_vasp_cmd N/A N/A self copy_magmom copy_magmom N/A setup N/A N/A self N/A N/A N/A 
        Performs initial setup for VaspJob, including overriding any settings
        and backing up.
         N/A files N/A N/A os listdir . N/A num_structures 0 N/A N/A N/A N/A N/A set files issuperset VASP_INPUT_FILES N/A N/A f files N/A N/A N/A N/A struct N/A read_structure f N/A num_structures 1 N/A N/A N/A N/A N/A N/A num_structures 1 N/A N/A N/A RuntimeError N/A N/A {} structures found. Unable to continue. format num_structures N/A N/A N/A N/A N/A self default_vis write_input struct . N/A N/A self backup N/A N/A f VASP_INPUT_FILES N/A N/A N/A N/A shutil copy f N/A N/A {}.orig format f N/A N/A self auto_npar N/A N/A N/A N/A incar N/A N/A Incar from_file INCAR N/A N/A N/A N/A N/A incar get LHFCALC N/A N/A incar get LRPA N/A N/A incar get LEPSILON N/A N/A N/A N/A N/A incar get IBRION N/A 5 6 7 8 N/A N/A N/A incar N/A NPAR N/A N/A multiprocessing N/A ncores N/A N/A N/A N/A os environ get NSLOTS N/A N/A multiprocessing cpu_count N/A ncores N/A int ncores N/A npar N/A range N/A int N/A N/A math sqrt ncores ncores N/A N/A N/A N/A ncores npar 0 N/A N/A N/A incar N/A NPAR npar N/A N/A N/A N/A incar write_file INCAR N/A N/A N/A N/A N/A N/A N/A self settings_override None N/A N/A N/A N/A N/A VaspModder apply_actions N/A self settings_override N/A run N/A N/A self N/A N/A N/A 
        Perform the actual VASP run.

        Returns:
            (subprocess.Popen) Used for monitoring.
         N/A cmd N/A list N/A self vasp_cmd N/A N/A self auto_gamma N/A N/A vi N/A N/A VaspInput from_directory . N/A kpts N/A vi N/A KPOINTS N/A N/A N/A N/A kpts style N/A N/A Kpoints supported_modes Gamma N/A N/A tuple N/A N/A kpts kpts N/A 0 N/A 1 1 1 N/A N/A N/A N/A N/A self gamma_vasp_cmd None N/A which N/A N/A self gamma_vasp_cmd N/A -1 N/A N/A cmd N/A self gamma_vasp_cmd N/A N/A N/A which N/A N/A cmd N/A -1 .gamma N/A N/A N/A cmd N/A -1 .gamma N/A N/A N/A logging info N/A N/A Running {} format N/A N/A join cmd N/A N/A open N/A self output_file w f N/A N/A p N/A N/A subprocess Popen cmd stdout f N/A p N/A postprocess N/A N/A self N/A N/A N/A 
        Postprocessing includes renaming and gzipping where necessary.
        Also copies the magmom to the incar if necessary
         N/A f N/A VASP_OUTPUT_FILES N/A N/A self output_file N/A N/A N/A N/A N/A os path exists f N/A N/A N/A N/A self final N/A N/A self suffix N/A N/A N/A N/A shutil move f N/A N/A {}{} format f N/A self suffix N/A N/A N/A N/A self suffix N/A N/A N/A N/A shutil copy f N/A N/A {}{} format f N/A self suffix N/A N/A N/A self copy_magmom N/A N/A self final N/A N/A N/A N/A outcar N/A Outcar OUTCAR N/A magmom N/A N/A m N/A tot N/A m N/A outcar magnetization N/A incar N/A N/A Incar from_file INCAR N/A N/A incar N/A MAGMOM magmom N/A N/A N/A incar write_file INCAR N/A N/A N/A N/A N/A N/A logging error MAGMOM copy from OUTCAR to INCAR failed N/A double_relaxation_run N/A N/A cls vasp_cmd auto_npar N/A True N/A N/A 
        Returns a list of two jobs corresponding to an AFLOW style double
        relaxation run.

        Args:
            vasp_cmd (str): Command to run vasp as a list of args. For example,
                if you are using mpirun, it can be something like
                ["mpirun", "pvasp.5.2.11"]
            auto_npar (bool): Whether to automatically tune NPAR to be sqrt(
                number of cores) as recommended by VASP for DFT calculations.
                Generally, this results in significant speedups. Defaults to
                True. Set to False for HF, GW and RPA calculations.

        Returns:
            List of two jobs corresponding to an AFLOW style run.
         N/A N/A N/A VaspJob vasp_cmd final False suffix .relax1 auto_npar auto_npar N/A VaspJob vasp_cmd final True backup False suffix .relax2 auto_npar auto_npar settings_override N/A N/A dict action INCAR N/A _set N/A ISTART 1 N/A file action CONTCAR N/A _file_copy N/A dest POSCAR N/A classmethod full_opt_run N/A N/A cls vasp_cmd auto_npar vol_change_tol max_steps N/A True 0.05 10 N/A N/A 
        Returns a generator of jobs for a full optimization run. Basically,
        this runs an infinite series of geometry optimization jobs until the
        % vol change in a particular optimization is less than vol_change_tol.

        Args:
            vasp_cmd (str): Command to run vasp as a list of args. For example,
                if you are using mpirun, it can be something like
                ["mpirun", "pvasp.5.2.11"]
            auto_npar (bool): Whether to automatically tune NPAR to be sqrt(
                number of cores) as recommended by VASP for DFT calculations.
                Generally, this results in significant speedups. Defaults to
                True. Set to False for HF, GW and RPA calculations.
            vol_change_tol (float): The tolerance at which to stop a run.
                Defaults to 0.05, i.e., 5%.
            max_steps (int): The maximum number of runs. Defaults to 10 (
                highly unlikely that this limit is ever reached).

        Returns:
            Generator of jobs.
         N/A i N/A xrange max_steps N/A N/A N/A i 0 N/A N/A settings None N/A backup True N/A N/A backup False N/A initial N/A N/A N/A Poscar from_file POSCAR structure N/A final N/A N/A N/A Poscar from_file CONTCAR structure N/A vol_change N/A N/A N/A final volume N/A initial volume N/A initial volume N/A N/A N/A logging info N/A Vol change = %.1f %%! N/A vol_change 100 N/A N/A N/A abs vol_change vol_change_tol N/A N/A N/A N/A logging info Stopping optimization! N/A N/A N/A settings N/A N/A dict action INCAR N/A _set N/A ISTART 1 N/A file action CONTCAR N/A _file_copy N/A dest POSCAR N/A N/A N/A logging info N/A Generating job = %d! N/A i 1 N/A N/A N/A VaspJob vasp_cmd final False backup backup suffix N/A .relax%d N/A i 1 auto_npar auto_npar settings_override settings N/A classmethod as_dict N/A N/A self N/A N/A N/A d N/A dict vasp_cmd N/A self vasp_cmd output_file N/A self output_file suffix N/A self suffix final N/A self final backup N/A self backup default_vasp_input_set N/A N/A N/A self default_vis as_dict auto_npar N/A self auto_npar auto_gamma N/A self auto_gamma settings_override N/A self settings_override gamma_vasp_cmd N/A self gamma_vasp_cmd N/A N/A d N/A @module N/A N/A self __class__ __module__ N/A N/A d N/A @class N/A N/A self __class__ __name__ N/A d N/A from_dict N/A N/A cls d N/A N/A N/A vis N/A N/A N/A MontyDecoder process_decoded N/A d N/A default_vasp_input_set N/A N/A VaspJob vasp_cmd N/A d N/A vasp_cmd output_file N/A d N/A output_file suffix N/A d N/A suffix final N/A d N/A final backup N/A d N/A backup default_vasp_input_set vis auto_npar N/A d N/A auto_npar auto_gamma N/A d N/A auto_gamma settings_override N/A d N/A settings_override gamma_vasp_cmd N/A d N/A gamma_vasp_cmd N/A classmethod N/A