Writers
QM-only input
- class QMzyme.Writers.QMWriter(filename, memory, nprocs, full_region=None)
Writes a QM input file for ORCA or Gaussian using AQME qprep.
- Parameters:
filename (str (required) Example: filename='1oh0_cutoff3') -- Name to be given to calculation input file. Does not need to contain file format suffix.
memory (str (optional, default memory='24GB')) -- Memory for the QM calculation (i) Gaussian: total memory; (ii) ORCA: memory per processor.
nprocs (int (optional, default nprocs=12)) -- Number of processors used in the QM calculation.
- write()
- reference()
QM/QM2 input
- class QMzyme.Writers.QMQM2Writer(filename, memory, nprocs, full_region=None, total_charge=None, total_mult=None, high_region=None, low_region=None)
Writes a QM input file for ORCA or Gaussian using AQME qprep.
- Parameters:
filename (str, required) -- Name to be given to calculation input file. Does not need to contain file format suffix. Example: filename='1oh0_cutoff3'.
memory (str, default='12GB') -- Memory for the QM calculation (i) Gaussian: total memory; (ii) ORCA: memory per processor.
nprocs (int, default nprocs=12) -- Number of processors used in the QM calculation.
high_region (
QMzymeRegion, optional) -- QMzymeRegion with assigned QM method. If not provided, the code will search in CalculateModel.calculation for the 'QM' entry.low_region (
QMzymeRegion, optional) -- QMzymeRegion with assigned QM method. If not provided, the code will search in CalculateModel.calculation for the 'QM2' entry.
- Notes:
Useful reminder for developers: Example text added to QM input file: .. code-block:: bash
!QM/QM2 WB97X-D3 DEF2-TZVP %QMMM QM2CUSTOMMETHOD "PBE D3BJ DEF2-SVP" QMATOMS {2:3} {6:13} END
The charge and multiplicity above the coordinates section is assigned to the high region (QM atoms).
- write(full_region, high_region)
- reference()
QM/xTB input
- class QMzyme.Writers.QMXTBWriter(filename, memory, nprocs, full_region=None, high_region=None, low_region=None, total_charge=None, total_mult=None)
Writes a QM input file for ORCA or Gaussian using AQME qprep.
- Parameters:
filename (str, required) -- Name to be given to calculation input file. Does not need to contain file format suffix. Example: filename='1oh0_cutoff3'
memory (str, default='12GB') -- Memory for the QM calculation (i) Gaussian: total memory; (ii) ORCA: memory per processor.
nprocs (int, default=12) -- Number of processors used in the QM calculation.
high_region (
QMzymeRegion, optional) -- QMzymeRegion with assigned QM method. If not provided, the code will search in CalculateModel.calculation for the 'QM' entry.low_region (
QMzymeRegion, optional) -- QMzymeRegion with assigned xTB method. If not provided, the code will search in CalculateModel.calculation for the 'XTB' entry.
- Notes:
Useful for developers. Example input: .. code-block:: bash
!QM/XTB WB97X-D3 DEF2-TZVP %QMMM QMATOMS {2:3} {6:13} END
The charge and mult above the coordinates section is assigned to the high region (QM atoms).
- write(full_region, high_region)
- reference()
QM/MM input
- class QMzyme.Writers.QMMMWriter(filename, memory, nprocs, full_region)
Under development.
Developer Classes
If you are interesed in contributing to the QMzyme project by adding a new concrete Writer class, you will need to be familiar with these developer classes. Read more about it in the QMzyme Documentation.
We hope to support multi-scale methods beyond 2 layers in the bear future.
- class QMzyme.Writers.Writer(filename, memory, nprocs, full_region)
Abstract Base Class for all calculation input file concrete writer classes. This class provides a rigid structure that imposes the required methods of all concrete writer classes to support community contributions.
If you are interested in contribute to QMzyme by creating a new writer class, see the QMzyme Documentation.
- abstractmethod write()
- abstractmethod reference()
- set_constraints()
- class QMzyme.Writers.WriterFactory
Factory Class to Register Concrete Writer Classes.
- writers = {'QM': <class 'QMzyme.Writers.QMWriter'>, 'QMChargeField': <class 'QMzyme.Writers.QMMMWriter'>, 'QMQM2': <class 'QMzyme.Writers.QMQM2Writer'>, 'QMXTB': <class 'QMzyme.Writers.QMXTBWriter'>}
- static register_writer(writer_type, writer)
- static make_writer(writer_type, filename, memory, nprocs, **kwargs)
Instantiates and returns the specific concrete writer subclass.