MDIServer

class qcengine.MDIServer(mdi_options, program, molecule, model, keywords, raise_error=False, local_options=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_natoms([natoms])

Receive the number of atoms in the system through MDI and create a new molecule with them

recv_total_charge([charge])

Receive the total system charge through MDI

run_energy()

rtype:

None

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

Send the name of the current node 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

Parameters:
  • mdi_options (str) –

  • program (str) –

  • raise_error (bool) –

  • local_options (Dict[str, Any] | None) –

recv_coords(coords=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.

Return type:

None

recv_elements(elements=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=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.

Return type:

None

recv_multiplicity(multiplicity=None)[source]

Receive the electronic multiplicity through MDI

Parameters:

multiplicity (int, optional) – New multiplicity of the system. If None, receive through MDI.

Return type:

None

recv_natoms(natoms=None)[source]

Receive the number of atoms in the system through MDI and create a new molecule with them

Parameters:

natoms (int, optional) – New number of atoms. If None, receive through MDI.

Return type:

None

recv_total_charge(charge=None)[source]

Receive the total system charge through MDI

Parameters:

charge (float, optional) – New charge of the system. If None, receive through MDI.

Return type:

None

run_energy()[source]
Return type:

None

send_coords()[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()[source]

Send the total energy through MDI

Returns:

energy – Energy of the system

Return type:

float

send_forces()[source]

Send the nuclear forces through MDI

Returns:

forces – Forces on the nuclei

Return type:

np.ndarray

send_masses()[source]

Send the nuclear masses through MDI

Returns:

masses – Atomic masses

Return type:

np.ndarray

send_multiplicity()[source]

Send the electronic multiplicity through MDI

Returns:

multiplicity – Multiplicity of the system

Return type:

int

send_natoms()[source]

Send the number of atoms through MDI

Returns:

natom – Number of atoms

Return type:

int

send_node()[source]

Send the name of the current node through MDI

Returns:

node – Name of the current node

Return type:

str

send_total_charge()[source]

Send the total system charge through MDI

Returns:

charge – Total charge of the system

Return type:

float

start()[source]

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

Return type:

None

stop()[source]

Stop listening for MDI commands

Return type:

None

update_molecule(key, value)[source]

Update the molecule

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

  • value – Update value