rdmc.external.inpwriter.qchem#

A module contains functions to write QChem input files.

rdmc.external.inpwriter.qchem.write_qchem_freq(mol, conf_id: int = 0, charge: int | None = None, mult: int | None = None, method: str = 'wb97x-d3', basis: str = 'def2-svp', scf_level: int = 8, nosymm: bool = False, **kwargs)#

Write the input file for QChem frequency calculation.

rdmc.external.inpwriter.qchem.write_qchem_irc(mol, conf_id: int = 0, charge: int | None = None, mult: int | None = None, method: str = 'wb97x-d3', basis: str = 'def2-svp', direction: str = 'forward', max_iter: int = 20, step_size: int = 70, coord_type: str = 'mass-weighted', scf_level: int = 8, nosymm: bool = False, **kwargs) str#

Write the input file for QChem optimization calculation. Note, for version >= 6.0, Libopt3 is utilized by qchem, and hessian can be computed analytically during the optimization, while for version < 6.0, hessian is numerically updated by BFGS method.

Parameters:
  • mol (RDKitMol) – The molecule to be run.

  • conf_id (int, optional) – The conformer ID to be run. Defaults to 0.

  • ts (bool, optional) – Whether the molecule is a TS. Defaults to False.

  • charge (int, optional) – The charge of the molecule. Defaults to None, to use the charge of mol.

  • mult (int, optional) – The multiplicity of the molecule. Defaults to None, to use the multiplicity of mol.

  • method (str, optional) – The method to be used. Defaults to “wb97x-d3”.

  • basis (str, optional) – The basis set to be used. Defaults to “def2-svp”.

  • max_iter (int, optional) – The maximum number of iterations. Defaults to 100.

  • coord_type (str, optional) – The coordinate type. Defaults to “mass-weighted”. Note, the default in gaussian program is “mass-weighted”, and the default in QChem program is cartesian.

  • modify_internal (dict, optional) – The internal coordinates to be modified. Defaults to None. # todo: implement this

  • scf_level (int, optional) – The scf convergence level. Defaults to 8 (recommanded by QChem).

  • hess (dict, optional) – The initial Hessian. Defaults to None. Only valid for version > 6.0

Returns:

str – The input file for QChem IRC optimization calculation.

rdmc.external.inpwriter.qchem.write_qchem_opt(mol, conf_id: int = 0, ts: bool = False, charge: int | None = None, mult: int | None = None, method: str = 'wb97x-d3', basis: str = 'def2-svp', max_iter: int = 100, coord_type: str = 'redundant', modify_internal: dict | None = None, scf_level: int = 8, hess: str = '', follow_freq: bool = False, nosymm: bool = False, qchemversion: str = '6.0', **kwargs) str#

Write the input file for QChem optimization calculation. Note, for version >= 6.0, Libopt3 is utilized by qchem, and hessian can be computed analytically during the optimization, while for version < 6.0, hessian is numerically updated by BFGS method.

Parameters:
  • mol (RDKitMol) – The molecule to be run.

  • conf_id (int, optional) – The conformer ID to be run. Defaults to 0.

  • ts (bool, optional) – Whether the molecule is a TS. Defaults to False.

  • charge (int, optional) – The charge of the molecule. Defaults to None, to use the charge of mol.

  • mult (int, optional) – The multiplicity of the molecule. Defaults to None, to use the multiplicity of mol.

  • method (str, optional) – The method to be used. Defaults to “wb97x-d3”.

  • basis (str, optional) – The basis set to be used. Defaults to “def2-svp”.

  • max_iter (int, optional) – The maximum number of iterations. Defaults to 100.

  • coord_type (str, optional) – The coordinate type. Defaults to “cartesian”.

  • modify_internal (dict, optional) – The internal coordinates to be modified. Defaults to None. # todo: implement this

  • scf_level (int, optional) – The scf convergence level. Defaults to 8 (recommanded by QChem).

  • hess (dict, optional) – The initial Hessian. Defaults to None. Only valid for version > 6.0

Returns:

str – The input file for QChem optimization calculation.