

@classmethod
def full_opt_run(cls, vasp_cmd, auto_npar=True, vol_change_tol=0.05, max_steps=10):
    '\n        Returns a generator of jobs for a full optimization run. Basically,\n        this runs an infinite series of geometry optimization jobs until the\n        % vol change in a particular optimization is less than vol_change_tol.\n\n        Args:\n            vasp_cmd (str): Command to run vasp as a list of args. For example,\n                if you are using mpirun, it can be something like\n                ["mpirun", "pvasp.5.2.11"]\n            auto_npar (bool): Whether to automatically tune NPAR to be sqrt(\n                number of cores) as recommended by VASP for DFT calculations.\n                Generally, this results in significant speedups. Defaults to\n                True. Set to False for HF, GW and RPA calculations.\n            vol_change_tol (float): The tolerance at which to stop a run.\n                Defaults to 0.05, i.e., 5%.\n            max_steps (int): The maximum number of runs. Defaults to 10 (\n                highly unlikely that this limit is ever reached).\n\n        Returns:\n            Generator of jobs.\n        '
    for i in xrange(max_steps):
        if (i == 0):
            settings = None
            backup = True
        else:
            backup = False
            initial = Poscar.from_file('POSCAR').structure
            final = Poscar.from_file('CONTCAR').structure
            vol_change = ((final.volume - initial.volume) / initial.volume)
            logging.info(('Vol change = %.1f %%!' % (vol_change * 100)))
            if (abs(vol_change) < vol_change_tol):
                logging.info('Stopping optimization!')
                break
            else:
                settings = [{
                    'dict': 'INCAR',
                    'action': {
                        '_set': {
                            'ISTART': 1,
                        },
                    },
                }, {
                    'file': 'CONTCAR',
                    'action': {
                        '_file_copy': {
                            'dest': 'POSCAR',
                        },
                    },
                }]
        logging.info(('Generating job = %d!' % (i + 1)))
        (yield VaspJob(vasp_cmd, final=False, backup=backup, suffix=('.relax%d' % (i + 1)), auto_npar=auto_npar, settings_override=max_steps))

dataset/ETHPy150Open materialsproject/custodian/custodian/vasp/jobs.py VaspJob.full_opt_run/VarMisuse@255/754 `settings`->`max_steps`