janus¶
driver¶
This is the qmmm driver module
-
janus.driver.
run_janus
(filename='input.json')¶ Drives the janus program. Creates an instance of the Initializer class and feeds wrappers to either
run_simulation()
orrun_single_point()
Parameters: filename (str) – Filename from which to read input parameters
-
janus.driver.
run_simulation
(md_sim_wrapper, qmmm_wrapper)¶ Drives QM/MM with MD time step integration
Parameters:
system¶
-
class
janus.system.
System
(qm_indices, qm_residues, run_ID, partition_ID='qm')¶ Bases:
object
A class that stores system information. Holds information such as energy, forces, and positions for a QM/MM partition. Stores qmmm and aqmmm information as well.
Parameters: - indices (qm) – indices of the atoms of the QM region
- run_ID (int) – the current step of the MD simulation
- partition_ID – An identifier for the specfic partition in aqmmm computations, default is ‘qm’
-
compute_scale_factor_g
(mm, link)¶ Computes scale factor g for link atom, RC, and RCD schemes. The equation used to compute g is:
rac{R_{qm} + R_{link}}{R_{qm} + R_{mm}}
where R is the pyykko covalent radius of an atom.
- qm : str
- element symbol of the QM atom involved in broken bond
- mm : str
- element symbol of the MM atom involved in broken bond
- link : str
- element symbol for link atom
- float
- g, the scaling factor
>>> compute_scale_factor_g('C', 'C', 'H')
-
class
janus.system.
Buffer
(ID)¶ Bases:
object
A class to store information for buffer groups from aqmmm computations. This includes the atom indicies contained in the buffer group, the switching function, COM coordinates, etc.
Parameters: ID – the identifer for the buffer group
Initializer¶
-
class
janus.initializer.
Initializer
(parameters, as_file=True)¶ Bases:
object
Class that initializes the initial parameters and necessary wrapppers.
Parameters: - paramaters (str) – filename of a json input file; if as_file is False, param is a dict
- as_file – param is a file if True, dict if False
-
get_wrappers
()¶ Determines what type of wrapper object to instantiate based on input parameters
-
initialize_wrappers
()¶ Instantiates wrapper objects based on input parameters. Create instances of appropriate wrappers for low and high level computations, QM/MM or adaptive QM/MM computations, as well as MD simulations.
Returns:
-
load_param
(fname)¶ Converts a json file into a dictionary
Parameters: fname (str) – name of json file Returns: parameters contained in filename Return type: dict
-
set_attributes
(dictionary, obj)¶ Sets values in the dicionary to be an attribute of the object given. The key of the dictionary will be set as an attribute of the object given.
Parameters: - dictionary (dict) – Dictionary with relevant parameters
- obj (obj) – Object to have attributes set to.
Returns: Return type: None
Examples
>>> set_attributes({'aqmmm' : False}, self)
This sets self.aqmmm to be False.