schrodinger.application.qsite.input module¶
Module for reading and writing QSite input files.
See QSiteInput class for more documentation.
Copyright Schrodinger, LLC. All rights reserved.
-
class
schrodinger.application.qsite.input.
Cut
(molid=None, chain=None, resnum=None, inscode=None, qmatom=None, mmatom=None, theory='qm')¶ Bases:
object
A class to handle representation and printing of general qm region cuts.
To avoid having to update individual attributes in the back end, attributes are read-only. To modify attributes, make a new Cut instance with the desired values. The clone method is provided as a convenience method to ease creation of a Cut with modified values.
-
__init__
(molid=None, chain=None, resnum=None, inscode=None, qmatom=None, mmatom=None, theory='qm')¶ Initializer for a qmregion cut specification.
At least one of molid or qmatom to be defined.
Parameters: - molid (int) – A molecule id.
- chain (str) – A chain id.
- resnum (int) – A residue number.
- inscode (str) – An insertion code.
- qmatom (str) – The name of an atom to place on the quantum mechanical side of the cut.
- mmatom (str) – The name of an atom to place on the molecular mechanical side of the cut.
- theory (str) – The theoretical method to use for this cut (“nddo” or “qm” and case-insensitive)
-
molid
¶ Read-only access to the molid attribute.
-
chain
¶ Read-only access to the chain attribute.
-
resnum
¶ Read-only access to the resnum attribute.
-
inscode
¶ Read-only access to the resnum attribute.
-
qmatom
¶ Read-only access to the qmatom attribute.
-
mmatom
¶ Read-only access to the mmatom attribute.
-
theory
¶ Read-only access to the theory attribute.
-
clone
(**kwargs)¶ Create a copy of the current instance, modifying any attributes provided as keywords.
-
header
()¶ Return the header definition for this cut that would be used in the QSite input file’s &qmregion section.
-
-
class
schrodinger.application.qsite.input.
HydrogenCap
(qm=None, mm=None, distance=0.0, theory='qm')¶ Bases:
object
A class to handle representation and printing of hydrogen caps for the qm region.
-
__init__
(qm=None, mm=None, distance=0.0, theory='qm')¶ Initialize the hydrogen cap. A quantum mechanical atom and molecular mechanical atom must always be specified.
Parameters: - qm (str) – The name of the quantum mechanical atom.
- mm (str) – The name of the molecular mechanical atom.
- distance (float) – The hydrogen cap distance.
- theory (str) – The theoretical model to use for the QM atom (Either “nddo” or “qm”, case-insensitive)
-
qm
¶ Read-only access to the _qm attribute.
-
mm
¶ Read-only access to the _mm attribute.
-
theory
¶ Read-only access to the _theory attribute.
-
distance
¶ Read-only access to the distance attribute.
-
clone
(**kwargs)¶ Create a copy of the current instance, modifying any attributes provided as keywords.
-
header
()¶ Return the header definition for this hydrogen cap that would be used in the QSite input file’s &qmregion section.
-
-
class
schrodinger.application.qsite.input.
QMRegion
(handle)¶ Bases:
object
A class to provide access to a &qmregion specification and the ability to create one on the fly.
-
__init__
(handle)¶ Parameters: - handle – An MMIM handle.
- type – int
-
__len__
()¶
-
modify
(index, **kwargs)¶ A method to modify attributes of a specific element in the qmregion list in-place.
This method is provided because Cut and HydrogenCap instances have read-only values.
-
append
(qmregion)¶ Add a new QM region to the list.
Parameters: qmregion (Cut or HydrogenCap) – A specification of a QM region cut or hydrogen cap.
-
-
class
schrodinger.application.qsite.input.
QSiteInput
(name)¶ Bases:
object
-
__init__
(name)¶ Create a QSite input object, either from a jobname or QSite input file path.
Parameters
- name (str)
- One of:
- jobname - Default parameters are used.
- or
- file path - Parameters are read from specified file.
- File must be in current working directory.
-
gen
¶ Provide dictionary-like access to &gen section
-
mmkey
¶ Provide dictionary-like access to the &mmkey section.
-
mopac
¶ Provide dictionary-like access to &mopac section
-
qmregion
¶ Provide access to the &qmregion section.
-
setStructureFile
(filename)¶ Set the mae structure file to be used. If the structure file name doesn’t match the current job/file name it will be copied to the current directory and renamed to <jobname>.<ext>.
-
getStructureFile
()¶ Return the mae structure that is used.
-
addQMMolecule
(index, theory='qm')¶ Add a QM molecule to the QM region specification.
This creates a Cut instance and adds it to the qmregion attribute.
-
addQMCut
(**kwargs)¶ Add a QM cut to the QM region specification.
The keywords here are the same as the Cut class constructor. Calling this method is equivalent to creating a Cut instance and adding it to the QSiteInput instance by calling qmregion.append().
-
addHydrogenCap
(qm=None, mm=None, distance=0.0, theory='qm')¶ Add a hydrogen cap to the QM region specification.
The keywords here are the same as the HydrogenCap class constructor. Calling this method is equivalent to creating a HydrogenCap instance and adding it to the QSiteInput instance by calling qmregion.append().
-
jobname
¶ get/set the jobname; setting the jobname also sets the filename
-
write
()¶ Write the input file to <jobname>.in. The structure file will also be written to <jobname>.<ext>, where <ext> is the extension of the specified structure file.
Structure file must be specified via setStructureFile() first.
Previous file with this name is overwritten.
-