MDIServer¶
-
class
qcengine.
MDIServer
(mdi_options: str, program: str, molecule, model, keywords, raise_error: bool = False, local_options: Optional[Dict[str, Any]] = None)[source]¶ Bases:
object
Methods Summary
recv_coords
([coords])Receive a set of nuclear coordinates through MDI and assign them to the atoms in the current molecule
recv_elements
([elements])Receive a set of atomic numbers through MDI and assign them to the atoms in the current molecule
recv_masses
([masses])Receive a set of nuclear masses through MDI and assign them to the atoms in the current molecule
recv_multiplicity
([multiplicity])Receive the electronic multiplicity through MDI
recv_total_charge
([charge])Receive the total system charge through MDI
Run an energy calculation
Send the nuclear coordinates through MDI
Send the atomic number of each nucleus through MDI
Send the total energy through MDI
Send the nuclear forces through MDI
Send the nuclear masses through MDI
Send the electronic multiplicity through MDI
Send the number of atoms through MDI
Send the name of the current node through MDI
Send the total system charge through MDI
start
()Receive commands through MDI and respond to them as defined by the MDI Standard
stop
()Stop listening for MDI commands
update_molecule
(key, value)Update the molecule
Methods Documentation
-
recv_coords
(coords: Optional[numpy.ndarray] = None) → None[source]¶ Receive a set of nuclear coordinates through MDI and assign them to the atoms in the current molecule
- Parameters
coords (np.ndarray, optional) – New nuclear coordinates. If None, receive through MDI.
-
recv_elements
(elements: Optional[List[int]] = None)[source]¶ Receive a set of atomic numbers through MDI and assign them to the atoms in the current molecule
-
recv_masses
(masses: Optional[List[float]] = None) → None[source]¶ Receive a set of nuclear masses through MDI and assign them to the atoms in the current molecule
-
recv_multiplicity
(multiplicity: Optional[int] = None) → None[source]¶ Receive the electronic multiplicity through MDI
- Parameters
multiplicity (int, optional) – New multiplicity of the system. If None, receive through MDI.
-
recv_total_charge
(charge: Optional[float] = None) → None[source]¶ Receive the total system charge through MDI
- Parameters
charge (float, optional) – New charge of the system. If None, receive through MDI.
-
send_coords
() → numpy.ndarray[source]¶ Send the nuclear coordinates through MDI
- Returns
coords – Nuclear coordinates
- Return type
np.ndarray
-
send_energy
() → float[source]¶ Send the total energy through MDI
- Returns
energy – Energy of the system
- Return type
-
send_forces
() → numpy.ndarray[source]¶ Send the nuclear forces through MDI
- Returns
forces – Forces on the nuclei
- Return type
np.ndarray
-
send_masses
() → numpy.ndarray[source]¶ Send the nuclear masses through MDI
- Returns
masses – Atomic masses
- Return type
np.ndarray
-
send_multiplicity
() → int[source]¶ Send the electronic multiplicity through MDI
- Returns
multiplicity – Multiplicity of the system
- Return type
-
send_natoms
() → int[source]¶ Send the number of atoms through MDI
- Returns
natom – Number of atoms
- Return type
-
send_node
() → str[source]¶ Send the name of the current node through MDI
- Returns
node – Name of the current node
- Return type
-
send_total_charge
() → float[source]¶ Send the total system charge through MDI
- Returns
charge – Total charge of the system
- Return type
-