👷♂️ Work in progress python package that provide various ∞RETIS tools for tasks like setting up simulations and analyzing data. 📈
🤝 Contributions of tools and modifications are welcome – feel free to submit your enhancements! 🚀
- Clone the repository
- (Optional) Create a virtual environment
- Install with:
python -m pip install -e .
inft -h
The command inft center_periodic
can be run to re-center an .xyz trajectory to a certain atom index. For example, to center the first atom C
at index 0 in the co2.xyz
frame in examples/co2.xyz
with cubic box length of 12.4138, the following command can be ran:
inft center_periodic -i co2.xyz -o co2_c.xyz -c 12.4138 -idx 0
Current CLI capabilities is powered by the Typer python library.
Any function function_name
in a python file *.py
with the following structure
from typing import Annotated
def function_name(
args1: Annotated[str, typer.Option("-args1", help="var1")],
args2: Annotated[int, typer.Option("-args2", help="var2")],
):
"""
Function description
"""
added to the folders inftools/exercises
, inftools/tistools
and inftools/xyz
will automatically be callable via the terminal as
inft function_name -args1 var1 -args2 var2
Individual functions can also be added to the CLI library by including them in inftools/bin.py
, as done for the wham function in the inftools/analysis
folder:
from inftools.analysis.wham import wham
MAPPER["wham"] = wham
The CLI functions are tested by utilizing the pytest python library.
The tests included in the inftools/test
folder can be ran by running the following command in the terminal:
pytest
We currently do not have a testing policy but please do include tests for the included CLI functions for higher coverage.