Purpose of the Module¶
This module reads the configurations of a molecular system generated by GROMACS and prepares the input for the GRASP Sampling module. The molecular system must contain a metal ion, that in the module is identified with the variable “metal_atom”. The module performs the following operations:
- It reads the configurations stored as .gro files in the ./GROMACS_Configurations directory
- It calculates, for each configuration, the Euclidean distances of all atoms from the metal ion.
- It idenfifies the permutational equivalent atoms
- It performs a Gaussian transformation of the distances
- It calculates the variances of transformed distances
- It selects the “v_len” coordinates with the higher variances
- It prepares the input for the GRASP Sampling module as a matrix N_conf x v_len including the transformed distances for all the configurations stored in the ./GROMACS_Configurations directory.
The “input_gromacs.txt” file must contain the following information:
- the path where the .gro files are stored
- the path of the file of the selected coordinates
- the path where the output files are written
- the number of the atoms of the system minus one
- the size of the output vectors that describe the configurations
- the readable format file of the input files (.gro)
- the sigma value of the Gaussian transformation
- the ID of the reference atom (the metal ion) in the Gromacs configurations
The module produces the “selected_coords.txt” file that identifies the v_len coordinates of the output matrix. The output files are: “d_store.txt” the matrix of the distances and “k_store.txt” the matrix of the transformed distances.
The source code of the algorithm is available from the E-CAM Gitlab repository. It is included in the file gromacs_interfaces.py, it is exectuted as follows:
$ python3.6 gromacs_interface.py
To test the module an example of the “input_gromacs.txt” file and a set of 100 configurations is provided in the ./test directory.