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_energy()

Run an energy calculation

send_commands()

Send the supported MDI commands through MDI

send_coords()

Send the nuclear coordinates through MDI

send_elements()

Send the atomic number of each nucleus through MDI

send_energy()

Send the total energy through MDI

send_forces()

Send the nuclear forces through MDI

send_masses()

Send the nuclear masses through MDI

send_multiplicity()

Send the electronic multiplicity through MDI

send_natoms()

Send the number of atoms through MDI

send_ncommands()

Send the number of supported MDI commands through MDI

send_total_charge()

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

Parameters

elements (list of int, optional) – New element numbers. If None, receive through MDI.

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

Parameters

masses (list of float, optional) – New nuclear masses. If None, receive through MDI.

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.

run_energy() → None[source]

Run an energy calculation

send_commands() → str[source]

Send the supported MDI commands through MDI

Returns

command_string – String containing the name of each supported command

Return type

str

send_coords() → numpy.ndarray[source]

Send the nuclear coordinates through MDI

Returns

coords – Nuclear coordinates

Return type

np.ndarray

send_elements()[source]

Send the atomic number of each nucleus through MDI

Returns

elements – Element of each atom

Return type

list of int

send_energy() → float[source]

Send the total energy through MDI

Returns

energy – Energy of the system

Return type

float

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

int

send_natoms() → int[source]

Send the number of atoms through MDI

Returns

natom – Number of atoms

Return type

int

send_ncommands() → int[source]

Send the number of supported MDI commands through MDI

Returns

ncommands – Number of supported commands

Return type

int

send_total_charge() → float[source]

Send the total system charge through MDI

Returns

charge – Total charge of the system

Return type

float

start() → None[source]

Receive commands through MDI and respond to them as defined by the MDI Standard

stop() → None[source]

Stop listening for MDI commands

update_molecule(key: str, value)[source]

Update the molecule

Parameters
  • key (str) – Key of the molecular element to update

  • value – Update value