pyiron_contrib.protocol.compound.qmmm module
- class pyiron_contrib.protocol.compound.qmmm.AddDisplacements(name=None)[source]
Bases:
PrimitiveVertex
- class pyiron_contrib.protocol.compound.qmmm.PartitionStructure(name=None)[source]
Bases:
PrimitiveVertex
- class pyiron_contrib.protocol.compound.qmmm.QMMM(**kwargs)[source]
Bases:
CompoundVertex
Relax a QM/MM coupled system.
Needs an MM job (incl. superstructure), a QM job reference, QM target site ids, optional target site chemistry, optional domain ids, optional QM cell instructions?
During setup, the domain indices are checked – if None, build them from scratch using shells and the cell…stuff?
- Input attributes:
structure (pyiron.atomistics.structure.atoms.Atoms): The full region I+II superstructure. mm_ref_job_full_path (str): Path to the pyiron job to use for evaluating forces and energies of the MM domains. qm_ref_job_full_path (str): Path to the pyiron job to use for evaluating forces and energies of the QM domain. domain_ids (dict): A dictionary of ids, seed, core, buffer, and filler, for mapping atoms of the MM
I+II superstructure to the various domains of the QM/MM coupling scheme. (Default is None, gets constructed using consecutive shells).
- seed_ids (int/list): The integer id (or ids) of atom(s) in the MM I+II superstructure to base the QM region on.
These are the only atoms whose species can be changed. (Default is None, which raises an error unless domain_ids was explicitly provided – else this parameter must be provided.)
- shell_cutoff (float): Maximum distance for two atoms to be considered neighbours in the construction of shells
for automatic system partitioning. (Default is None, which will raise an error – this parameter must be provided if domain partitioning is done using seed_ids and shells. When domain_ids are explicitly provided, shell_cutoff is not needed.)
n_core_shells (int): How many neighbour shells around the seed(s) to relax using QM forces. (Default is 2.) n_buffer_shells (int): How many neighbour shells around the region I core to relax using MM forces. (Default is
2.)
- seed_species (str/list): The species for each ‘seed’ atom in the QM domain. Value(s) should be a atomic symbol,
e.g. ‘Mg’. (Default is None, which leaves all seeds the same as they occur in the input structure.)
- vacuum_width (float): Minimum vacuum distance between atoms in two periodic images of the QM domain. Influences
the final simulation cell for the QM calculation. (Default is 2.)
- filler_width (float): Length added to the bounding box of the region I atoms to create a new box from which to
draw filler atoms using the initial MM I+II superstructure. Influences the final simulation cell for the QM calculation.If the value is not positive, no filler atoms are used. The second, larger box uses the same center as the bounding box of the QM region I, so this length is split equally to the positive and negative sides for each cartesian direction. (Default is 6.)
n_steps (int): The maximum number of minimization steps to make. (Default is 100.) f_tol (float): The maximum force on any atom below which the calculation terminates. Only atoms which could be
relaxed are considered, i.e. QM forces for region I core, and MM forces for region II and I buffer. (Filler atoms are not real, so we never care about their forces.) (Default is 1e-4 eV/angstrom.)
- Output attributes:
- energy_mm (float): The total energy in eV of the region I+II superstructure (without seed species) using the MM
representation.
- energy_qm (float): The total energy in eV of the region I+filler structure (with seed species) using QM
representation.
- energy_mm_small (float): The total energy in eV of the region I+filler structure (without seed species) using
the representation.
energy_qmmm (float): The composite QM/MM energy: energy_mm + energy_qm - energy_mm_small in eV. max_force (float): The largest atomic force among QM forces on region I core atoms or MM forces on region I
buffer and region II atoms.
positions (numpy.ndarray): The per-atom vector of cartesian positions for the entire region I+II superstructure.
- DefaultWhitelist = {'calc_static_mm': {'output': {'energy_pot': 1}}, 'calc_static_qm': {'output': {'energy_pot': 1}}}
- define_information_flow()[source]
Connect input and output information inside the graph. Also set the archive clock for all vertices.