(ELEMENTS-target)= # ELEMENTS Exchange atomic element information. ## >ELEMENTS Send atomic numbers. **Datatype:** `MDI_INT` **Quantity**: `NATOMS` **Format:** Sequentially ascending order of atomic index. The driver sends a set of atomic numbers to the engine, which replaces the atomic number of each atom in its system with the values sent by the driver. ### Examples ::::{tab-set} :::{tab-item} Python :sync: python ```python import mdi # connect to the engine mdi_engine = mdi.MDI_Accept_Communicator() # retrieve the number of atoms mdi.MDI_Send_Command("ELEMENTS", mdi_engine) mdi.MDI_Send(elements, natoms, mdi.MDI_INT, mdi_engine) ``` ::: :::{tab-item} C++ :sync: cpp ```cpp #include "mdi.h" #include // connect to the engine MDI_Comm mdi_engine = MDI_Accept_Communicator(); // retrieve the number of atoms int natoms; MDI_Send_Command(" elements(natoms); // send the atomic numbers to the engine MDI_Send_Command(">ELEMENTS", mdi_engine); MDI_Send(elements.data(), natoms, MDI_INT, mdi_engine); ``` ::: :::: ## // connect to the engine MDI_Comm mdi_engine = MDI_Accept_Communicator(); // retrieve the number of atoms int natoms; MDI_Send_Command(" elements(natoms); // receive the atomic numbers from the engine MDI_Send_Command("