This project is designed to analyze cavity formation energies in molecular dynamics simulations. It includes a Python script to process data, a configuration file for settings, and a C program for computational efficiency.
- Python 3.x
- Poetry (for dependency management)
- GCC (for compiling the C code)
- Libraries:
numpy,MDAnalysis,matplotlib,pandas,ase,pyyaml
-
Clone the repository:
git clone https://github.com/WanluLigroupUCSD/Cavity.git cd Cavity -
Install dependencies using Poetry:
poetry install
-
Compile the C code:
gcc -shared -o cavity.so -fPIC cavity.c -lm
The configuration settings for the project are defined in config.yaml, which you can find in the tests directory.
-
Compile the
cavity.cwith gcc or icc:Make sure the
cavity.sofile in the directory that you will run the python script. -
Run the python script:
poetry run python get_cavity.py
The script performs the following tasks:
- Loads the configuration from config.yaml
- Initializes MDAnalysis with the specified XYZ files
- Computes cavity formation energies using the compiled C library (cavity.so)
- Outputs results to the specified file
- get_cavity.py: Main Python script for data processing and analysis
- config.yaml: Configuration file with parameters for the analysis
- cavity.c: C code for computational routines to speed up distance calculations
This project is licensed under the MIT License. See the LICENSE file for details.
This project is developed as part of the research work at the University of California, San Diego, under the supervision of Dr. Li.