firecode 1.6.0__tar.gz → 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- firecode-2.0.0/.coveragerc +29 -0
- {firecode-1.6.0 → firecode-2.0.0}/.gitignore +1 -0
- {firecode-1.6.0 → firecode-2.0.0}/CHANGELOG.md +25 -6
- firecode-2.0.0/PKG-INFO +151 -0
- firecode-2.0.0/README.md +120 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/__main__.py +59 -38
- {firecode-1.6.0 → firecode-2.0.0}/firecode/ase_manipulations.py +501 -221
- {firecode-1.6.0 → firecode-2.0.0}/firecode/atropisomer_module.py +0 -1
- firecode-1.6.0/firecode/calculators/_ase_uma.py → firecode-2.0.0/firecode/calculators/ase_uma.py +33 -10
- firecode-2.0.0/firecode/calculators/solvation_delta_calc.py +246 -0
- firecode-1.6.0/firecode/calculators/_xtb.py → firecode-2.0.0/firecode/calculators/xtb.py +44 -322
- firecode-2.0.0/firecode/context_managers.py +178 -0
- firecode-2.0.0/firecode/dispatcher.py +331 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/embedder.py +275 -444
- {firecode-1.6.0 → firecode-2.0.0}/firecode/embedder_options.py +54 -58
- firecode-2.0.0/firecode/ensemble.py +297 -0
- firecode-2.0.0/firecode/interfaces/crest.py +457 -0
- firecode-2.0.0/firecode/interfaces/goat.py +415 -0
- firecode-2.0.0/firecode/md/equilibration.py +277 -0
- firecode-2.0.0/firecode/md/packmol.py +359 -0
- firecode-2.0.0/firecode/modify_settings.py +128 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/multiembed.py +2 -1
- {firecode-1.6.0 → firecode-2.0.0}/firecode/operators.py +226 -71
- {firecode-1.6.0 → firecode-2.0.0}/firecode/optimization_methods.py +119 -177
- {firecode-1.6.0 → firecode-2.0.0}/firecode/pka.py +2 -48
- {firecode-1.6.0 → firecode-2.0.0}/firecode/pt.py +1 -1
- {firecode-1.6.0 → firecode-2.0.0}/firecode/quotes.json +5 -1
- {firecode-1.6.0 → firecode-2.0.0}/firecode/rdkit_tools.py +17 -2
- {firecode-1.6.0 → firecode-2.0.0}/firecode/references.py +9 -0
- firecode-2.0.0/firecode/settings.py +67 -0
- firecode-2.0.0/firecode/solvents.py +226 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/standalone_optimizer.py +364 -124
- firecode-2.0.0/firecode/tests/C2H4.xyz +8 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/conftest.py +4 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/embed_multiembed/embed_multiembed.txt +1 -1
- firecode-2.0.0/firecode/tests/operator_crest_search/operator_crest_search.txt +2 -0
- firecode-2.0.0/firecode/tests/operator_crest_search/salt.xyz +20 -0
- firecode-2.0.0/firecode/tests/operator_equilibrate/C2H4.xyz +8 -0
- firecode-2.0.0/firecode/tests/operator_equilibrate/operator_equilibrate.txt +2 -0
- firecode-2.0.0/firecode/tests/operator_goat/.firecoderc +2 -0
- firecode-2.0.0/firecode/tests/operator_goat/H2O.xyz +5 -0
- firecode-2.0.0/firecode/tests/operator_goat/operator_goat.txt +2 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/operator_neb/operator_neb.txt +1 -1
- firecode-2.0.0/firecode/tests/operator_pka/operator_pka.txt +4 -0
- firecode-2.0.0/firecode/tests/operator_racerts/operator_racerts.txt +4 -0
- firecode-2.0.0/firecode/tests/operator_racerts/taut_TS.xyz +11 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/operator_rdkit_search/operator_rdkit_search.txt +1 -1
- firecode-2.0.0/firecode/tests/operator_saddle/operator_saddle.txt +2 -0
- firecode-2.0.0/firecode/tests/operator_saddle/propane_ts.xyz +13 -0
- firecode-2.0.0/firecode/tests/operator_scan+neb/operator_scan+neb.txt +2 -0
- firecode-2.0.0/firecode/tests/operator_scan+neb/taut.xyz +11 -0
- firecode-2.0.0/firecode/tests/test_suite.py +304 -0
- firecode-2.0.0/firecode/thermochemistry.py +670 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/torsion_module.py +1 -8
- {firecode-1.6.0 → firecode-2.0.0}/firecode/units.py +16 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/utils.py +65 -162
- {firecode-1.6.0 → firecode-2.0.0}/pixi.lock +773 -162
- {firecode-1.6.0 → firecode-2.0.0}/pyproject.toml +28 -7
- firecode-1.6.0/.ase/gui.py +0 -1
- firecode-1.6.0/PKG-INFO +0 -81
- firecode-1.6.0/README.md +0 -52
- firecode-1.6.0/docs/conf.py +0 -64
- firecode-1.6.0/docs/embeddings.rst +0 -74
- firecode-1.6.0/docs/examples.rst +0 -188
- firecode-1.6.0/docs/images/atropo.png +0 -0
- firecode-1.6.0/docs/images/complex_embed_cd.png +0 -0
- firecode-1.6.0/docs/images/embeds.svg +0 -449
- firecode-1.6.0/docs/images/intro_embed.PNG +0 -0
- firecode-1.6.0/docs/images/logo.png +0 -0
- firecode-1.6.0/docs/images/orbitals.png +0 -0
- firecode-1.6.0/docs/images/peptide.png +0 -0
- firecode-1.6.0/docs/images/peptide_chemdraw.png +0 -0
- firecode-1.6.0/docs/images/plot.svg +0 -1534
- firecode-1.6.0/docs/images/qz_firecode.gif +0 -0
- firecode-1.6.0/docs/images/trimolecular.png +0 -0
- firecode-1.6.0/docs/index.rst +0 -13
- firecode-1.6.0/docs/installation.rst +0 -85
- firecode-1.6.0/docs/introduction.rst +0 -93
- firecode-1.6.0/docs/license.rst +0 -551
- firecode-1.6.0/docs/operators_keywords.rst +0 -214
- firecode-1.6.0/docs/requirements.txt +0 -2
- firecode-1.6.0/docs/usage.rst +0 -62
- firecode-1.6.0/firecode/modify_settings.py +0 -199
- firecode-1.6.0/firecode/settings.py +0 -71
- firecode-1.6.0/firecode/solvents.py +0 -131
- firecode-1.6.0/firecode/tests/embed_cyclical/C2H4.xyz +0 -8
- firecode-1.6.0/firecode/tests/operator_crest_search/dimer.xyz +0 -12
- firecode-1.6.0/firecode/tests/operator_crest_search/operator_crest_search.txt +0 -6
- firecode-1.6.0/firecode/tests/operator_pka/operator_pka.txt +0 -4
- firecode-1.6.0/firecode/tests/operator_scan+neb/SN2.xyz +0 -8
- firecode-1.6.0/firecode/tests/operator_scan+neb/operator_scan+neb.txt +0 -2
- firecode-1.6.0/firecode/tests/operator_scan_linear/dimer.xyz +0 -12
- firecode-1.6.0/firecode/tests/operator_scan_linear/operator_scan_linear.txt +0 -2
- firecode-1.6.0/firecode/tests/test_suite.py +0 -162
- {firecode-1.6.0 → firecode-2.0.0}/.github/workflows/test.yml +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/.pre-commit-config.yaml +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/.readthedocs.yaml +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/LICENSE +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/MANIFEST.in +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/__init__.py +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/algebra.py +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/embeds.py +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/errors.py +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/graph_manipulations.py +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/hypermolecule_class.py +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/parameters.py +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/profiler.py +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/quotes.py +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/reactive_atoms_classes.py +0 -0
- {firecode-1.6.0/firecode/tests → firecode-2.0.0/firecode/tests/embed_chelotropic}/C2H4.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/embed_chelotropic/HCOOOH.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/embed_chelotropic/embed_chelotropic.txt +0 -0
- {firecode-1.6.0/firecode/tests/embed_chelotropic → firecode-2.0.0/firecode/tests/embed_cyclical}/C2H4.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/embed_cyclical/embed_cyclical.txt +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/embed_multiembed/HCOOH.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/embed_string/CH3Cl.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/embed_string/HCOOH.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/embed_string/embed_string.txt +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/embed_trimolecular/CH3Cl.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/embed_trimolecular/HCOOH.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/embed_trimolecular/embed_trimolecular.txt +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/operator_fsm/anti_to_gauche.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/operator_fsm/operator_fsm.txt +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/operator_neb/anti_to_gauche.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/operator_pka/HCOOH.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/operator_pka/Me2NH2+.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/operator_pka/Me3N.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/operator_rdkit_search/butane.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/operator_scan_dihedral/C2F2H4.xyz +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/tests/operator_scan_dihedral/operator_scan_dihedral.txt +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/firecode/typing_.py +0 -0
- {firecode-1.6.0 → firecode-2.0.0}/icon.ico +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
[run]
|
|
2
|
+
source = prism_pruner
|
|
3
|
+
omit =
|
|
4
|
+
firecode/__main__.py
|
|
5
|
+
*/.pixi/*
|
|
6
|
+
*/tests/*
|
|
7
|
+
# */venv/*
|
|
8
|
+
# setup.py
|
|
9
|
+
# */__pycache__/*
|
|
10
|
+
|
|
11
|
+
[report]
|
|
12
|
+
exclude_lines =
|
|
13
|
+
# Have to re-enable the standard pragma
|
|
14
|
+
pragma: no cover
|
|
15
|
+
|
|
16
|
+
# Don't complain about missing debug-only code:
|
|
17
|
+
def __repr__
|
|
18
|
+
if self\.debug
|
|
19
|
+
|
|
20
|
+
# Don't complain if tests don't hit defensive assertion code:
|
|
21
|
+
raise AssertionError
|
|
22
|
+
raise NotImplementedError
|
|
23
|
+
|
|
24
|
+
# Don't complain if non-runnable code isn't run:
|
|
25
|
+
if 0:
|
|
26
|
+
if __name__ == .__main__.:
|
|
27
|
+
|
|
28
|
+
# Don't complain if an ellipsis isn't run (typically in an abstractmethod):
|
|
29
|
+
^\s*\.\.\.
|
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
|
|
2
|
-
<!--
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<!-- add documentation: SCRAMBLECHECK kw, fsm>, neb>, rdkit_search>, standalone optimizer, non-inline constraints-->
|
|
3
|
+
<!-- add number of active constraints printout for parallel multithread functions -->
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## FIRECODE 2.0.0 🔥 (WIP)
|
|
7
|
+
- Restructured and expanded solvent module.
|
|
8
|
+
- Implemented vibrational analysis via ASE including quasi-RRHO thermochemistry to get free energies.
|
|
9
|
+
- Added Sella dependency to perform saddle points optimization with the `saddle>` operator.
|
|
10
|
+
- Added FREQ keyword, computing free energies at the end of embedding or refine runs.
|
|
11
|
+
- Added `freq>` operator for standalone frequency analysis on any ensemble.
|
|
12
|
+
- Added T (temperature, in K), T_C (temperature, in °C), P (pressure, in atm), and C (concentration, in mol/L) keywords.
|
|
13
|
+
- Updated CREST interface to version 3 of the program (see [paper](https://doi.org/10.1063/5.0197592) and [documentation](https://crest-lab.github.io/crest-docs/))
|
|
14
|
+
- Added delta solvation implementation for gas-phase ML models, providing energies _and_ forces via TBLITE in the geometry optimization loop. Activate with environmental variable FIRECODE_SOLV_IMPLEM_FOR_ML="opt"
|
|
15
|
+
- Dropped support for native XTB calculator, and XTB-pyhton interface, since TBLITE is the modern successor.
|
|
16
|
+
- Added basic [racerts](https://github.com/digital-chemistry-laboratory/racerts) interface ("rdkit_search>" operator, alias of "racerts>").
|
|
17
|
+
- Removed PROCS keyword.
|
|
18
|
+
- Removed force field pre-optimization and related keywords (FFCALC, FFLEVEL)
|
|
19
|
+
- Added basic interface to ORCA's [GOAT](https://onlinelibrary.wiley.com/doi/abs/10.1002/anie.202500393) via the `goat>` operator (GFN2-xTB level with GFN-FF uphill steps).
|
|
20
|
+
- Renamed "CRESTNCI" keyword to "NCI" to cater for both CREST and GOAT.
|
|
21
|
+
- Significant restructuring of some core code organization (interfaces, context_manager.py, settings.py)
|
|
22
|
+
- Separated interfaces with external programs in "interfaces".
|
|
23
|
+
- Added the use of environmental variables throughout the codebase. Defaults in settings.py, specific context managers in utils.py.
|
|
24
|
+
- Environment variables in settings.py can now be overridden by a local `.firecoderc` with key=value pairs in the same folder as the input file.
|
|
25
|
+
- Added automated [packmol](https://github.com/m3g/packmol) solvator interface (`packmol>` operator, **preview**!).
|
|
26
|
+
<!-- - Added MD equilibration of solvated boxes (`equilibrate>`) -->
|
|
8
27
|
|
|
9
28
|
## FIRECODE 1.6.0 🔥 (March 11 2026)
|
|
10
29
|
- Refreshed constraints handling in operators.
|
firecode-2.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: firecode
|
|
3
|
+
Version: 2.0.0
|
|
4
|
+
Summary: FIRECODE: Filtering Refiner and Embedder for Conformationally Dense Ensembles
|
|
5
|
+
Author-email: Nicolò Tampellini <nicolo.tampellini@yale.edu>
|
|
6
|
+
License-Expression: LGPL-3.0-or-later
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: <3.13,>=3.12
|
|
9
|
+
Requires-Dist: ase
|
|
10
|
+
Requires-Dist: inquirerpy
|
|
11
|
+
Requires-Dist: matplotlib
|
|
12
|
+
Requires-Dist: mlfsm
|
|
13
|
+
Requires-Dist: networkx
|
|
14
|
+
Requires-Dist: numpy
|
|
15
|
+
Requires-Dist: prettytable
|
|
16
|
+
Requires-Dist: prism-pruner
|
|
17
|
+
Requires-Dist: psutil
|
|
18
|
+
Requires-Dist: racerts>=0.1.6
|
|
19
|
+
Requires-Dist: rdkit>=2025.9.3
|
|
20
|
+
Requires-Dist: rich
|
|
21
|
+
Requires-Dist: scipy
|
|
22
|
+
Requires-Dist: sella>=2.4.2
|
|
23
|
+
Provides-Extra: aimnet2
|
|
24
|
+
Requires-Dist: aimnet[ase]; extra == 'aimnet2'
|
|
25
|
+
Provides-Extra: full
|
|
26
|
+
Requires-Dist: aimnet[ase]; extra == 'full'
|
|
27
|
+
Requires-Dist: fairchem-core; extra == 'full'
|
|
28
|
+
Provides-Extra: uma
|
|
29
|
+
Requires-Dist: fairchem-core; extra == 'uma'
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# FIRECODE - Filtering Refiner and Embedder for Conformationally Dense Ensembles
|
|
34
|
+
|
|
35
|
+
<div align="center">
|
|
36
|
+
|
|
37
|
+
[](https://opensource.org/licenses/LGPL-3.0)
|
|
38
|
+

|
|
39
|
+
[](https://pixi.sh)
|
|
40
|
+

|
|
41
|
+

|
|
42
|
+
[](https://www.codefactor.io/repository/github/ntampellini/firecode)
|
|
43
|
+
[](https://codecov.io/gh/ntampellini/FIRECODE)
|
|
44
|
+
|
|
45
|
+
[](https://pypi.org/project/firecode/)
|
|
46
|
+
[](https://pypi.org/project/firecode/)
|
|
47
|
+
[](https://firecode.readthedocs.io/en/latest/?badge=latest)
|
|
48
|
+

|
|
49
|
+
[](https://github.com/charliermarsh/ruff)
|
|
50
|
+
|
|
51
|
+

|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<p align="center">
|
|
56
|
+
|
|
57
|
+
<img src="docs/images/logo.png" alt="FIRECODE logo" class="center" width="500"/>
|
|
58
|
+
|
|
59
|
+
</p>
|
|
60
|
+
|
|
61
|
+
FIRECODE is a computational chemistry workflow driver and hub for the generation, optimization and refinement of conformational ensembles, including transition state and thermochemical utilities.
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
<!-- It runs flexible workflows for conformer generation (via [CREST](https://github.com/crest-lab/crest), [RDKit](https://github.com/rdkit/rdkit)), double-ended TS search ([NEB](https://ase-lib.org/ase/neb.html) via [ASE](https://github.com/rosswhitfield/ase), [ML-FSM](https://github.com/thegomeslab/ML-FSM)), and (constrained) ensemble optimization through popular calculators like [XTB](https://github.com/grimme-lab/xtb), [TBLITE](https://github.com/tblite/tblite), [ORCA](https://www.orcasoftware.de/tutorials_orca/), and Pytorch Neural Network models ([AIMNET2](https://github.com/isayevlab/AIMNet2), [UMA](https://huggingface.co/facebook/UMA)) via [ASE](https://github.com/rosswhitfield/ase).
|
|
66
|
+
|
|
67
|
+
Conformational pruning is performed with the now standalone [PRISM Pruner](https://github.com/ntampellini/prism_pruner).
|
|
68
|
+
|
|
69
|
+
As a legacy feature from [TSCoDe](https://github.com/ntampellini/TSCoDe), FIRECODE can also assemble non-covalent adducts from conformational ensembles (embedding) programmatically. -->
|
|
70
|
+
|
|
71
|
+
## Calculators
|
|
72
|
+
|
|
73
|
+
- [xTB](https://github.com/grimme-lab/xtb) *(native)*
|
|
74
|
+
- [tblite](https://github.com/tblite/tblite) *(via [ASE](https://github.com/rosswhitfield/ase))*
|
|
75
|
+
- [AIMNET2](https://github.com/isayevlab/AIMNet2) *(via [ASE](https://github.com/rosswhitfield/ase))*
|
|
76
|
+
- [UMA](https://huggingface.co/facebook/UMA) *(via [ASE](https://github.com/rosswhitfield/ase))*
|
|
77
|
+
|
|
78
|
+
## Interfaces / utilities
|
|
79
|
+
|
|
80
|
+
- [CREST](https://github.com/crest-lab/crest) *(conformational search)*
|
|
81
|
+
- [GOAT](https://onlinelibrary.wiley.com/doi/abs/10.1002/anie.202500393) *(conformational search)*
|
|
82
|
+
- [racerts](https://github.com/digital-chemistry-laboratory/racerts) *(conformational search)*
|
|
83
|
+
- [ETKDG](https://pubs.acs.org/doi/10.1021/acs.jcim.0c00025) *(via [rdkit](https://github.com/rdkit/rdkit), conformational search)*
|
|
84
|
+
- [TSCoDe](https://github.com/ntampellini/TSCoDe) *(conformational embedding)*
|
|
85
|
+
- [prism_pruner](https://github.com/ntampellini/prism_pruner) *(conformational pruning)*
|
|
86
|
+
- [ML-FSM](https://pubs.acs.org/doi/10.1021/acs.jcim.0c00025) *(two-ended TS search)*
|
|
87
|
+
- [Sella](https://github.com/zadorlab/sella) *(saddle point optimization)*
|
|
88
|
+
<!-- - [packmol](https://github.com/m3g/packmol) *(explicit solvation)* -->
|
|
89
|
+
|
|
90
|
+
...plus frequency calculation, NEB optimization, and more are all implemented in the code in a calculator-agnostic way.
|
|
91
|
+
|
|
92
|
+
## Installation
|
|
93
|
+
|
|
94
|
+
The package is distributed via `pip`, and the use of [`uv`](https://docs.astral.sh/uv/) is highly recommended. The default installation is minimalistic, and torch/GPU support requires dedicated installs:
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
uv pip install firecode # XTB, TBLITE, ORCA
|
|
98
|
+
uv pip install firecode[aimnet2] # + AIMNET2
|
|
99
|
+
uv pip install firecode[uma] # + UMA/OMOL
|
|
100
|
+
uv pip install firecode[full] # + AIMNET2, UMA/OMOL
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
More installation details in the documentation.
|
|
104
|
+
|
|
105
|
+
## Usage
|
|
106
|
+
|
|
107
|
+
Installation exposes the main program working on a plain text file as well as a standalone optimizer.
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
🔥 firecode [-h] [-s] [-t] input.txt [-n NAME] [-p]
|
|
111
|
+
|
|
112
|
+
positional arguments:
|
|
113
|
+
inpufile.txt Input filename, can be any text file.
|
|
114
|
+
|
|
115
|
+
optional arguments:
|
|
116
|
+
-h, --help Show this help message and exit.
|
|
117
|
+
-s, --setup Guided setup of the calculation settings.
|
|
118
|
+
-n, --name NAME Specify a custom name for the run.
|
|
119
|
+
-cl,--command_line Read instructions from the command line instead of from an input file.
|
|
120
|
+
-p, --profile Profile the run through cProfiler.
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
🔥 firecode_opt [-h] [-i] [-t TEMPERATURE] [-c CALCULATOR] [-m METHOD] [-s SOLVENT] [-o] [-f] [--ts] [--irc] [--cfile CFILE] [-n] [--debug]
|
|
125
|
+
filenames [filenames ...]
|
|
126
|
+
|
|
127
|
+
positional arguments:
|
|
128
|
+
filenames Input filename(s), in .xyz format
|
|
129
|
+
|
|
130
|
+
options:
|
|
131
|
+
-h, --help show this help message and exit
|
|
132
|
+
-i, --interactive Set options interactively.
|
|
133
|
+
-t TEMPERATURE, --temperature TEMPERATURE
|
|
134
|
+
Temperature, in degrees Celsius.
|
|
135
|
+
-c CALCULATOR, --calculator CALCULATOR
|
|
136
|
+
Calculator (default UMA).
|
|
137
|
+
-m METHOD, --method METHOD
|
|
138
|
+
Method (default OMOL for UMA).
|
|
139
|
+
-s SOLVENT, --solvent SOLVENT
|
|
140
|
+
Solvent (default ch2cl2).
|
|
141
|
+
-o, --opt Optimize the geometry.
|
|
142
|
+
-f, --freq Perform vibrational analysis.
|
|
143
|
+
--ts, --saddle Optimize to a TS.
|
|
144
|
+
--irc Run an IRC calculation.
|
|
145
|
+
--cfile CFILE Uses a constraint file.
|
|
146
|
+
-n, --newfile Write optimized structure to a new file (*_opt.xyz).
|
|
147
|
+
--debug Does not delete optimization data.
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Documentation
|
|
151
|
+
Documentation on how to install and use the program can be found on [readthedocs](https://firecode.readthedocs.io/en/latest/index.html).
|
firecode-2.0.0/README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
|
|
2
|
+
# FIRECODE - Filtering Refiner and Embedder for Conformationally Dense Ensembles
|
|
3
|
+
|
|
4
|
+
<div align="center">
|
|
5
|
+
|
|
6
|
+
[](https://opensource.org/licenses/LGPL-3.0)
|
|
7
|
+

|
|
8
|
+
[](https://pixi.sh)
|
|
9
|
+

|
|
10
|
+

|
|
11
|
+
[](https://www.codefactor.io/repository/github/ntampellini/firecode)
|
|
12
|
+
[](https://codecov.io/gh/ntampellini/FIRECODE)
|
|
13
|
+
|
|
14
|
+
[](https://pypi.org/project/firecode/)
|
|
15
|
+
[](https://pypi.org/project/firecode/)
|
|
16
|
+
[](https://firecode.readthedocs.io/en/latest/?badge=latest)
|
|
17
|
+

|
|
18
|
+
[](https://github.com/charliermarsh/ruff)
|
|
19
|
+
|
|
20
|
+

|
|
21
|
+
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<p align="center">
|
|
25
|
+
|
|
26
|
+
<img src="docs/images/logo.png" alt="FIRECODE logo" class="center" width="500"/>
|
|
27
|
+
|
|
28
|
+
</p>
|
|
29
|
+
|
|
30
|
+
FIRECODE is a computational chemistry workflow driver and hub for the generation, optimization and refinement of conformational ensembles, including transition state and thermochemical utilities.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
<!-- It runs flexible workflows for conformer generation (via [CREST](https://github.com/crest-lab/crest), [RDKit](https://github.com/rdkit/rdkit)), double-ended TS search ([NEB](https://ase-lib.org/ase/neb.html) via [ASE](https://github.com/rosswhitfield/ase), [ML-FSM](https://github.com/thegomeslab/ML-FSM)), and (constrained) ensemble optimization through popular calculators like [XTB](https://github.com/grimme-lab/xtb), [TBLITE](https://github.com/tblite/tblite), [ORCA](https://www.orcasoftware.de/tutorials_orca/), and Pytorch Neural Network models ([AIMNET2](https://github.com/isayevlab/AIMNet2), [UMA](https://huggingface.co/facebook/UMA)) via [ASE](https://github.com/rosswhitfield/ase).
|
|
35
|
+
|
|
36
|
+
Conformational pruning is performed with the now standalone [PRISM Pruner](https://github.com/ntampellini/prism_pruner).
|
|
37
|
+
|
|
38
|
+
As a legacy feature from [TSCoDe](https://github.com/ntampellini/TSCoDe), FIRECODE can also assemble non-covalent adducts from conformational ensembles (embedding) programmatically. -->
|
|
39
|
+
|
|
40
|
+
## Calculators
|
|
41
|
+
|
|
42
|
+
- [xTB](https://github.com/grimme-lab/xtb) *(native)*
|
|
43
|
+
- [tblite](https://github.com/tblite/tblite) *(via [ASE](https://github.com/rosswhitfield/ase))*
|
|
44
|
+
- [AIMNET2](https://github.com/isayevlab/AIMNet2) *(via [ASE](https://github.com/rosswhitfield/ase))*
|
|
45
|
+
- [UMA](https://huggingface.co/facebook/UMA) *(via [ASE](https://github.com/rosswhitfield/ase))*
|
|
46
|
+
|
|
47
|
+
## Interfaces / utilities
|
|
48
|
+
|
|
49
|
+
- [CREST](https://github.com/crest-lab/crest) *(conformational search)*
|
|
50
|
+
- [GOAT](https://onlinelibrary.wiley.com/doi/abs/10.1002/anie.202500393) *(conformational search)*
|
|
51
|
+
- [racerts](https://github.com/digital-chemistry-laboratory/racerts) *(conformational search)*
|
|
52
|
+
- [ETKDG](https://pubs.acs.org/doi/10.1021/acs.jcim.0c00025) *(via [rdkit](https://github.com/rdkit/rdkit), conformational search)*
|
|
53
|
+
- [TSCoDe](https://github.com/ntampellini/TSCoDe) *(conformational embedding)*
|
|
54
|
+
- [prism_pruner](https://github.com/ntampellini/prism_pruner) *(conformational pruning)*
|
|
55
|
+
- [ML-FSM](https://pubs.acs.org/doi/10.1021/acs.jcim.0c00025) *(two-ended TS search)*
|
|
56
|
+
- [Sella](https://github.com/zadorlab/sella) *(saddle point optimization)*
|
|
57
|
+
<!-- - [packmol](https://github.com/m3g/packmol) *(explicit solvation)* -->
|
|
58
|
+
|
|
59
|
+
...plus frequency calculation, NEB optimization, and more are all implemented in the code in a calculator-agnostic way.
|
|
60
|
+
|
|
61
|
+
## Installation
|
|
62
|
+
|
|
63
|
+
The package is distributed via `pip`, and the use of [`uv`](https://docs.astral.sh/uv/) is highly recommended. The default installation is minimalistic, and torch/GPU support requires dedicated installs:
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
uv pip install firecode # XTB, TBLITE, ORCA
|
|
67
|
+
uv pip install firecode[aimnet2] # + AIMNET2
|
|
68
|
+
uv pip install firecode[uma] # + UMA/OMOL
|
|
69
|
+
uv pip install firecode[full] # + AIMNET2, UMA/OMOL
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
More installation details in the documentation.
|
|
73
|
+
|
|
74
|
+
## Usage
|
|
75
|
+
|
|
76
|
+
Installation exposes the main program working on a plain text file as well as a standalone optimizer.
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
🔥 firecode [-h] [-s] [-t] input.txt [-n NAME] [-p]
|
|
80
|
+
|
|
81
|
+
positional arguments:
|
|
82
|
+
inpufile.txt Input filename, can be any text file.
|
|
83
|
+
|
|
84
|
+
optional arguments:
|
|
85
|
+
-h, --help Show this help message and exit.
|
|
86
|
+
-s, --setup Guided setup of the calculation settings.
|
|
87
|
+
-n, --name NAME Specify a custom name for the run.
|
|
88
|
+
-cl,--command_line Read instructions from the command line instead of from an input file.
|
|
89
|
+
-p, --profile Profile the run through cProfiler.
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
🔥 firecode_opt [-h] [-i] [-t TEMPERATURE] [-c CALCULATOR] [-m METHOD] [-s SOLVENT] [-o] [-f] [--ts] [--irc] [--cfile CFILE] [-n] [--debug]
|
|
94
|
+
filenames [filenames ...]
|
|
95
|
+
|
|
96
|
+
positional arguments:
|
|
97
|
+
filenames Input filename(s), in .xyz format
|
|
98
|
+
|
|
99
|
+
options:
|
|
100
|
+
-h, --help show this help message and exit
|
|
101
|
+
-i, --interactive Set options interactively.
|
|
102
|
+
-t TEMPERATURE, --temperature TEMPERATURE
|
|
103
|
+
Temperature, in degrees Celsius.
|
|
104
|
+
-c CALCULATOR, --calculator CALCULATOR
|
|
105
|
+
Calculator (default UMA).
|
|
106
|
+
-m METHOD, --method METHOD
|
|
107
|
+
Method (default OMOL for UMA).
|
|
108
|
+
-s SOLVENT, --solvent SOLVENT
|
|
109
|
+
Solvent (default ch2cl2).
|
|
110
|
+
-o, --opt Optimize the geometry.
|
|
111
|
+
-f, --freq Perform vibrational analysis.
|
|
112
|
+
--ts, --saddle Optimize to a TS.
|
|
113
|
+
--irc Run an IRC calculation.
|
|
114
|
+
--cfile CFILE Uses a constraint file.
|
|
115
|
+
-n, --newfile Write optimized structure to a new file (*_opt.xyz).
|
|
116
|
+
--debug Does not delete optimization data.
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Documentation
|
|
120
|
+
Documentation on how to install and use the program can be found on [readthedocs](https://firecode.readthedocs.io/en/latest/index.html).
|
|
@@ -14,13 +14,14 @@ GNU General Public License for more details.
|
|
|
14
14
|
|
|
15
15
|
https://github.com/ntampellini/firecode
|
|
16
16
|
|
|
17
|
-
Nicolo' Tampellini -
|
|
17
|
+
Nicolo' Tampellini - ntamp@mit.edu
|
|
18
18
|
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
21
|
import argparse
|
|
22
22
|
import os
|
|
23
23
|
import sys
|
|
24
|
+
from io import TextIOWrapper
|
|
24
25
|
|
|
25
26
|
from rich.traceback import install
|
|
26
27
|
|
|
@@ -28,13 +29,16 @@ install(show_locals=True)
|
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
def main() -> None:
|
|
31
|
-
|
|
32
|
-
sys.
|
|
32
|
+
# Redirect stdout and stderr to handle encoding errors
|
|
33
|
+
sys.stdout = TextIOWrapper(
|
|
34
|
+
sys.stdout.buffer, encoding="utf-8", errors="replace", write_through=True
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
sys.stderr = TextIOWrapper(
|
|
38
|
+
sys.stdout.buffer, encoding="utf-8", errors="replace", write_through=True
|
|
39
|
+
)
|
|
33
40
|
|
|
34
|
-
usage = """\n\n 🔥
|
|
35
|
-
🔥 python -m firecode -cl "refine> crest_search> mol.xyz"
|
|
36
|
-
🔥 python -m firecode -c
|
|
37
|
-
🔥 python -m firecode -o mol.xyz
|
|
41
|
+
usage = """\n\n 🔥 firecode [-h] [-s] [-t] input.txt [-n NAME] [-p]
|
|
38
42
|
|
|
39
43
|
positional arguments:
|
|
40
44
|
inpufile.txt Input filename, can be any text file.
|
|
@@ -44,9 +48,7 @@ def main() -> None:
|
|
|
44
48
|
-s, --setup Guided setup of the calculation settings.
|
|
45
49
|
-n, --name NAME Specify a custom name for the run.
|
|
46
50
|
-cl,--command_line Read instructions from the command line instead of from an input file.
|
|
47
|
-
-c, --cite Print citation links.
|
|
48
51
|
-p, --profile Profile the run through cProfiler.
|
|
49
|
-
-o, --optimize FILE Run a standalone structure optimization tool.
|
|
50
52
|
|
|
51
53
|
"""
|
|
52
54
|
|
|
@@ -70,13 +72,6 @@ def main() -> None:
|
|
|
70
72
|
parser.add_argument(
|
|
71
73
|
"-n", "--name", help="Specify a custom name for the run.", action="store", required=False
|
|
72
74
|
)
|
|
73
|
-
parser.add_argument(
|
|
74
|
-
"-c",
|
|
75
|
-
"--cite",
|
|
76
|
-
help="Print the appropriate document links for citation purposes.",
|
|
77
|
-
action="store_true",
|
|
78
|
-
required=False,
|
|
79
|
-
)
|
|
80
75
|
parser.add_argument(
|
|
81
76
|
"-p",
|
|
82
77
|
"--profile",
|
|
@@ -84,19 +79,13 @@ def main() -> None:
|
|
|
84
79
|
action="store_true",
|
|
85
80
|
required=False,
|
|
86
81
|
)
|
|
87
|
-
parser.add_argument(
|
|
88
|
-
"-o",
|
|
89
|
-
"--optimize",
|
|
90
|
-
help="Run a standalone structure optimization tool.",
|
|
91
|
-
action="store",
|
|
92
|
-
required=False,
|
|
93
|
-
nargs="+",
|
|
94
|
-
)
|
|
95
82
|
|
|
96
83
|
args = parser.parse_args()
|
|
97
84
|
|
|
98
|
-
|
|
99
|
-
|
|
85
|
+
env_variables_handling()
|
|
86
|
+
|
|
87
|
+
if (not (args.setup or args.command_line)) and args.inputfile is None:
|
|
88
|
+
parser.error("One of the following arguments are required: inputfile, -t, -s.\n")
|
|
100
89
|
|
|
101
90
|
if args.setup:
|
|
102
91
|
from firecode.modify_settings import run_setup
|
|
@@ -104,18 +93,6 @@ def main() -> None:
|
|
|
104
93
|
run_setup()
|
|
105
94
|
sys.exit(0)
|
|
106
95
|
|
|
107
|
-
if args.cite:
|
|
108
|
-
print(
|
|
109
|
-
"No citation link is available for FIRECODE yet. You can link to the code on https://www.github.com/ntampellini/firecode"
|
|
110
|
-
)
|
|
111
|
-
sys.exit(0)
|
|
112
|
-
|
|
113
|
-
if args.optimize:
|
|
114
|
-
from firecode.standalone_optimizer import main
|
|
115
|
-
|
|
116
|
-
main(args.optimize)
|
|
117
|
-
sys.exit(0)
|
|
118
|
-
|
|
119
96
|
if args.command_line:
|
|
120
97
|
filename = "input_firecode.txt"
|
|
121
98
|
with open(filename, "w") as f:
|
|
@@ -140,5 +117,49 @@ def main() -> None:
|
|
|
140
117
|
# run the program
|
|
141
118
|
|
|
142
119
|
|
|
120
|
+
def env_variables_handling() -> None:
|
|
121
|
+
"""Handles global environment variables and associated processes.
|
|
122
|
+
|
|
123
|
+
Priority should be given to handling env vars with locally-scoped
|
|
124
|
+
context managers, if possible (see the env_override function).
|
|
125
|
+
"""
|
|
126
|
+
from pathlib import Path
|
|
127
|
+
from shutil import rmtree
|
|
128
|
+
|
|
129
|
+
# remove compilation cache for jax: we might be running on different
|
|
130
|
+
# hardware from the last firecode run, and that might result in nasty
|
|
131
|
+
# compatibility issues with stale compilation of the jax library.
|
|
132
|
+
jax_comp_cache_dir = Path.home() / ".cache/sella/jax_cache"
|
|
133
|
+
rmtree(str(jax_comp_cache_dir), ignore_errors=True)
|
|
134
|
+
|
|
135
|
+
# export "FIRECODE_*" environment variables
|
|
136
|
+
from firecode.settings import ENV_VARS
|
|
137
|
+
|
|
138
|
+
for key, value in ENV_VARS.items():
|
|
139
|
+
os.environ.setdefault(key, value)
|
|
140
|
+
|
|
141
|
+
# override/add from global .firecoderc
|
|
142
|
+
if Path("~/.firecoderc").exists():
|
|
143
|
+
set_env_vars_from_file("~/.firecoderc")
|
|
144
|
+
|
|
145
|
+
# override/add from local .firecoderc
|
|
146
|
+
if ".firecoderc" in os.listdir(os.getcwd()):
|
|
147
|
+
set_env_vars_from_file(".firecoderc")
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def set_env_vars_from_file(filename: str) -> None:
|
|
151
|
+
"""Set environment variable from a text file."""
|
|
152
|
+
with open(filename, "r") as f:
|
|
153
|
+
lines = f.readlines()
|
|
154
|
+
|
|
155
|
+
print(f"--> Setting environment variables from {filename}")
|
|
156
|
+
for line in lines:
|
|
157
|
+
key, value = line.split("=")
|
|
158
|
+
key = key.strip().upper()
|
|
159
|
+
value = value.strip()
|
|
160
|
+
os.environ[key] = value
|
|
161
|
+
print(f" {key}={value}")
|
|
162
|
+
|
|
163
|
+
|
|
143
164
|
if __name__ == "__main__":
|
|
144
165
|
main()
|