Conformers¶
AMS’s Conformers is a flexible tool for conformers generation.
This page documents the PLAMS interface to Conformers. For a description of the capabilities and options of the Conformers tool, see the documentation in the AMS user manual.
See also
The conformers generation example in the Examples section of the PLAMS manual.
ConformersJob¶
Technical
Import these classes from scm.conformers
, not scm.plams
!
from scm.conformers import ConformersJob, ConformersResults
The ConformersJob
class, which derives from SingleJob
class, can be used to set up and run a Conformers calculation.
The input options for the Conformers tool (described here) can be specified in the input.ams
branch of a setting object. See the Conformers Generation example.
-
class
ConformersJob
(name='conformers', molecule=None, **kwargs)[source]¶ -
_result_type
¶ alias of
scm.conformers.plams.interface.ConformersResults
-
__init__
(name='conformers', molecule=None, **kwargs)[source]¶ Initialize self. See help(type(self)) for accurate signature.
-
check
()[source]¶ Check if the calculation was successful.
This method can be overridden in concrete subclasses of
SingleJob
. It should return a boolean value. The definition here serves as a default, to prevent crashing if a subclass does not define its owncheck()
. It always returnsTrue
.
-
get_input
()[source]¶ Generate the input file. Abstract method.
This method should return a single string with the full content of the input file. It should process information stored in the
input
branch of job settings and in themolecule
attribute.
-
get_runscript
()[source]¶ Generate the runscript. Abstract method.
This method should return a single string with the runscript contents. It can process information stored in
runscript
branch of job settings. In general the full runscript has the following form:[first line defined by job.settings.runscript.shebang] [contents of job.settings.runscript.pre, when present] [value returned by get_runscript()] [contents of job.settings.runscript.post, when present]
When overridden, this method should pay attention to
.runscript.stdout_redirect
key in job’ssettings
.
-
-
class
ConformersResults
(*args, **kwargs)[source]¶ A specialized
Results
subclass for accessing the results of ConformersJob. Conformers are sorted by energy, from lowest to highest.-
get_conformers
()[source]¶ Return a list containing all conformers found. The conformers are sorted according to their energy, the first element being the lowest energy conformer.
-
get_relative_energies
(unit='au')[source]¶ Return the relative energies of the conformers i.e. the energy of the conformer minus the energy of the lowest conformer found. This list is sorted according to the energy of the conformers, the first element corresponding to the lowest energy conformer. So, by definition, the first element will have an energy of 0.
-
get_energies
(unit='au')[source]¶ Return the energies of the conformers. This list is sorted according to the energy of the conformers, the first element corresponding to the lowest energy conformer.
-
get_boltzmann_distribution
(temperature)[source]¶ Return the Boltzmann distribution at a given temperature: exp^(E_i/kB*temperature) / (sum_j exp^(E_j/kB*temperature)), where E_i is the energy of conformer i. This list is sorted according to the energy of the conformers, the first element corresponding to the lowest energy (and highest probability) conformer. The temperature is in Kelvin.
-
collect
()[source]¶ Collect files present in the job folder.
Use parent method from
Results
to get a list of all files in the results folder. Then instantiateself.rkf
to be aKFFile
instance for the mainconformers.rkf
output file. Also instantiateself._conformers
to be a Conformers instance built from it.This method is called automatically during the final part of the job execution and there is no need to call it manually.
-