Python wrapper for the FreeDTS C++ project
Project description
pyFreeDTS
pyFreeDTS is wrapper for the FreeDTS C++ project and aims to simplify installing and interfacing with FreeDTS.
Installation
After ensuring your system satisfies the following requirements
- Python 3.8+
- C++ compiler with C++11 support
- OpenMP (optional)
you can install pyFreeDTS using pip
pip install pyfreedts
Usage
pyFreeDTS mirrors the original FreeDTS binaries, but changed the spelling to lower-ase to avoid collision
dts arg1 arg2 ...
cnv arg1 arg2 ...
gen arg1 arg2 ...
Parameter Screening
From version 2.2 onwards, pyFreeDTS simplifies running parameter screens by introducing templated dts files
Kappa = {{kappa:25.0:35.0:5.0}} 0 0 # Range: 25.0 to 35.0, step 5.0
Temperature = {{temp:1.0,1.5,2.0}} 0 # List: 1.0, 1.5, 2.0
Method = {{method:MC,MD}} 0 # String list
Set_Steps = 1 {{steps:1000,5000}} # Integer list
A DTS screen based on such a template file can be performed using
dts_screen \
-in input_template.dts \
--output-dir screen_result \
--dts-args "-top /absolute/path/to/topol.top -seed 12345 -e 100000" \
--backend-args "-j 4 --keep-going" \
--dry-run
where --dts-args are parameters passed to the dts executable, and --backend-args are parameters passed to the execution backend specified via --backend. The default is snakemake and can be installed using pip
pip install snakemake
Through snakemake, DTS screens can be run locally and on all commonly available HPC platforms.
[!IMPORTANT] The topologies listed in topol.top need to be specified using their absolute path.
Running the pipeline will generate numbered directories in --output-dir, each of which contains the result of a DTS run with corresponding params.json. A summary of all parameters and corresponding directories is given by screen_summary.json in the specified output directory.
screen_result/
├── Snakefile
├── sweep_summary.json
├── run_0001/
│ ├── input.dts
│ ├── params.json
│ ├── dts_*
│ └── completed.flag
└── run_NNNN/
├── input.dts
├── params.json
├── dts_*
└── completed.flag
[!IMPORTANT] Every screen needs to run for at least 1000 steps (
-dts-args '-e 1000'), due to an implementation detail in FreeDTS.
For Developers
Clone and install with Poetry:
git clone https://github.com/maurerv/pyfreedts.git
cd pyfreedts
poetry install
Run tests:
poetry run pytest
License
Like FreeDTS, pyFreeDTS is available under a CC-BY-NC-ND 4.0 International license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyfreedts-2.1.1.tar.gz.
File metadata
- Download URL: pyfreedts-2.1.1.tar.gz
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.11.12 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4368b2ec2983682dea0f8a1342ccdc405c8e30687279625dbd065dc26a5f3656
|
|
| MD5 |
9fddaf8a9048fa417b76e3b8f6db0d4a
|
|
| BLAKE2b-256 |
cbc9390d2e5a1119713d993cf04b1cc27f2fc3bc57f42968b7a4626e2bc83914
|
File details
Details for the file pyfreedts-2.1.1-cp311-cp311-macosx_26_0_arm64.whl.
File metadata
- Download URL: pyfreedts-2.1.1-cp311-cp311-macosx_26_0_arm64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.11, macOS 26.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.11.12 Darwin/25.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c707304b575364da687917840bcd4a6aa3306f1380085a2d39914cd5a9b8cda
|
|
| MD5 |
627065f5ef14d27cd1a3c945a75320c9
|
|
| BLAKE2b-256 |
1f24998f6c5542c0f13dce085ddec7731447ed938413a52583895783010148aa
|