(COORDS-target)= # COORDS Exchange atomic coordinate information. ## >COORDS Send atomic coordinates. **Datatype:** `MDI_DOUBLE` **Quantity**: `3 * NATOMS` **Units:** Bohr **Format:** Sequentially ascending order of atomic index, with the coordinates for each individual atom being provided in xyz order. The driver sends a set of atomic coordinates to the engine, which replaces its atomic coordinates with those 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() # create an array of atomic coordinates # send the atomic coordinates to the engine mdi.MDI_Send_Command(">COORDS", mdi_engine) mdi.MDI_Send(coords, 3*natoms, mdi.MDI_DOUBLE, mdi_engine) ``` ::: :::{tab-item} C++ :sync: cpp ```cpp #include "mdi.h" #include // connect to the engine MDI_Comm mdi_engine = MDI_Accept_Communicator(); // create a vector of atomic coordinates // send the atomic coordinates to the engine MDI_Send_Command(">COORDS", mdi_engine); MDI_Send(coords.data(), 3*natoms, MDI_DOUBLE, mdi_engine); ``` ::: :::: ## // connect to the engine MDI_Comm mdi_engine = MDI_Accept_Communicator(); // create a buffer to hold the atomic coordinates std::vector coords(3*natoms); // receive the atomic coordinates from the engine MDI_Send_Command("