cctk.MAEFile¶
- class cctk.MAEFile(name=None)[source]¶
Bases:
File
Class representing Maestro
.mae
files.- name¶
name of file
- Type:
str
Methods
__init__
([name])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 aMAEFile
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, returnsself.ensemble.molecules[num]
- classmethod read_file(filename, name=None, **kwargs)[source]¶
Reads
.mae
file and generates aMAEFile
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