md.parsers.OrcaFormatter

class md.parsers.OrcaFormatter(position, stop: int | None = None, datatype: str = 'vector', converter: type = <class 'numpy.float64'>, skip_first: int | None = None, unit: float | None = None, default: float | None = None)[source]

Format raw ORCA data collected by an OrcaPropertyParser. Behavior is determined by the datatype option. This is e.g. used to extract the correct gradient values from the associated text block taken from the ORCA output and convert it to a properly formatted force array.

Parameters:
  • position (int) – Position to start formatting. If no stop is provided returns only value at position, otherwise all values between position and stop are returned. (Only used for vector mode)

  • stop (int, optional) – Stop value for range. (Only used for vector mode)

  • datatype (str, optional) –

    Change formatting behavior. The possible options are:

    • vector:

      Formats data between position and stop argument, if provided converting it to the type given in the converter.

    • matrix:

      Formats collected matrix data into the shape of a square, symmetric numpy.ndarray. Ignores other options.

  • converter (type, optional) – Convert data to type. (Only used for ‘vector’ mode)

  • default (float, optional) – Default value to be returned if nothing is parsed (e.g. 1.0 for vacuum in case of dielectric constant.

  • skip_first (int, optional) – If not None, skip the first N lines (default=None).