used. If that is set to a list of directory names, the volumes and
    structures will be concatenated and sorted according to the volume value.

    If you set a 'slice' tag in the under the tag 'phonopy', like

        phonopy:
          volumes_and_structures:
            slice: [null, -4]

    The slice is applied to the volume and structure list.

    """

    run_specs, filename = rmd.get_run_specs_and_filename()
    cwd = os.getcwd()
    rmd.chdir(rmd.get_run_dir(run_specs))
    rmd.filedump(run_specs, filename)

    phonopy_specs = run_specs['phonopy']
    phonopy_specs['dim'] = ' '.join(map(str, phonopy_specs['dim']))
    incar = rmd.read_incar(run_specs)
    if os.path.isfile('../properties.json'):
        properties = rmd.fileload('../properties.json')
        if 'ISPIN' not in incar:
            if rmd.detect_is_mag(properties['mag']):
                incar.update({'ISPIN': 2})
            else:
                incar.update({'ISPIN': 1})

    # higher priority for run_specs
    if 'poscar' in run_specs:
예제 #2
0
    Run convergence test with changing kpoints subdivision values, and plot
    figures.

    You should set a 'kpoints_test' tag in the specs file, like

        kpoints_test:
          density_change: [1000, 2000, 4000]
          force_gamma: True

    Obviously, 'kpoints' tag should be omitted.

    """

    run_specs, filename = rmd.get_run_specs_and_filename()
    rmd.chdir(rmd.get_run_dir(run_specs))
    rmd.filedump(run_specs, filename)
    rmd.init_stdout()

    rmd.infer_from_json(run_specs)
    structure = rmd.get_structure(run_specs)
    incar = rmd.read_incar(run_specs)

    kpoints_specs = run_specs['kpoints_test']
    if 'force_gamma' in kpoints_specs:
        force_gamma = kpoints_specs['force_gamma']
    else:
        force_gamma = False

    if 'density_change' in kpoints_specs:
        density_change = np.array(kpoints_specs['density_change'])