cctk.MAEFile

class cctk.MAEFile(name=None)[source]

Bases: cctk.file.File

Class representing Maestro .mae files.

name

name of file

Type

str

ensemble

Ensemble or ConformationalEnsemble object

Type

Ensemble

__init__(name=None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([name])

Initialize self.

append_to_file(filename, text)

Appends output text to a file.

get_molecule([num])

Returns the last molecule from the ensemble.

read_file(filename[, name])

Reads .mae file and generates a MAEFile instance.

write_file(filename, text[, overwrite_existing])

Writes output text to a file.

static append_to_file(filename, text)

Appends output text to a file.

Parameters
  • filename (str) – path to file, including name (e.g. path/to/input.gjf)

  • text (str) – desired contents of file

Returns

True if write succeeded, False otherwise

get_molecule(num=None)[source]

Returns the last molecule from the ensemble.

If num is specified, returns self.ensemble.molecules[num]

classmethod read_file(filename, name=None, **kwargs)[source]

Reads .mae file and generates a MAEFile instance.

Parameters
  • filename (str) – path to file

  • name (str) – name of the file

Returns

MAEFile object property names (list) property_values (list)

static write_file(filename, text, overwrite_existing=True)

Writes output text to a file.

Parameters
  • filename (str) – path to file, including name (e.g. path/to/input.gjf)

  • text (str) – desired contents of file

  • overwrite_existing (Bool) – whether any existing files should be overwritten or not

Returns

True if write succeeded, False otherwise