This project contains Python bindings for the gorder tool for calculating lipid order parameters from Gromacs simulations.
See the gorder manual and Python API documentation for more information.
To install gorder as a Python package, you can use pip:
pip install git+https://github.com/Ladme/gorder.git#subdirectory=pygorder
But you should use uv instead. Here is how you add gorder to your uv project:
uv add git+https://github.com/Ladme/gorder.git#subdirectory=pygorder
The following script calculates coarse-grained lipid order parameters using a TPR file system.tpr and a trajectory file md.xtc. The results are written into order.yaml.
import gorder analysis = gorder.Analysis( structure = "system.tpr", trajectory = "md.xtc", analysis_type = gorder.analysis_types.CGOrder("@membrane"), output_yaml = "order.yaml", ) results = analysis.run() results.write()