pwtools.parse.CpmdSCFOutputFile

class pwtools.parse.CpmdSCFOutputFile(*args, **kwds)[source]

Bases: StructureFileParser

Parse output from a CPMD “single point calculation” (wave function optimization).

Some extra files are assumed to be in the same directory as self.filename.

extra files:

GEOMETRY.scale

Notes

  • The SYSTEM section must have SCALE such that a file GEOMETRY.scale is written.

  • To have forces in the output, use PRINT ON FORCES COORDINATES in the CPMD section:

    &CPMD
        OPTIMIZE WAVEFUNCTION
        CONVERGENCE ORBITALS
            1.0d-7
        PRINT ON FORCES COORDINATES
        STRESS TENSOR
            1
        ODIIS NO_RESET=10
            20
        MAXITER
            100
        FILEPATH
            /tmp
    &END
    &SYSTEM
        SCALE
        ....
    &END
    
__init__(*args, **kwds)[source]

Methods

apply_units()

Like _apply_units_raw(), make sure that units are only applied once.

assert_attr(attr)

Raise AssertionError if self.<attr> is not set (is_set_attr() returns False.

assert_attr_lst(attr_lst)

assert_set_attr(attr)

Same as assert_attr(), but run try_set_attr() first.

assert_set_attr_lst(attr_lst)

check_set_attr(attr)

Run try_set_attr() and return the result of is_set_attr(), i.e. True or False.

check_set_attr_lst(attr_lst)

dump(dump_filename[, mkdir])

Write object to binary file using pickle.

get_cell()

2d cell [Bohr]

get_cont([auto_calc])

Populate and return a Container object.

get_coords_frac()

get_etot()

[Ha]

get_forces()

[Ha / Bohr]

get_natoms()

Number of atoms.

get_nkpoints()

get_nstep_scf()

get_return_attr(attr_name)

Call try_set_attr() are return self.<attr_name> if set.

get_scf_converged()

get_stress()

[kbar]

get_struct(**kwds)

get_symbols()

init_attr_lst([attr_lst])

Set each self.<attr> in attr_lst to None.

is_set_attr(attr)

Check if self has the attribute self.<attr> and if it is _not_ None.

is_set_attr_lst(attr_lst)

load(dump_filename)

Load pickled object.

parse()

raw_return(attr_name)

Call try_set_attr(_<attr_name>_raw) and return it if set, else None.

raw_slice_get(attr_name, sl, axis)

Shortcut method:

set_all([attr_lst])

Call getter for each attr name in attr_lst.

set_attr_lst(attr_lst)

Set self.attr_lst and init each attr to None.

try_set_attr(attr)

If self.<attr> does not exist or is None, then invoke an appropirately named getter as if this command would be executed.

try_set_attr_lst(attr_lst)

update_units(units)

Update self.units dict from units.

Attributes

default_units