firecode 1.3.0__tar.gz → 1.4.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.
Files changed (76) hide show
  1. {firecode-1.3.0 → firecode-1.4.0}/CHANGELOG.md +7 -1
  2. {firecode-1.3.0 → firecode-1.4.0}/MANIFEST.in +2 -1
  3. {firecode-1.3.0/firecode.egg-info → firecode-1.4.0}/PKG-INFO +19 -15
  4. {firecode-1.3.0 → firecode-1.4.0}/README.md +1 -1
  5. {firecode-1.3.0 → firecode-1.4.0}/docs/conf.py +1 -1
  6. {firecode-1.3.0 → firecode-1.4.0}/firecode/__main__.py +2 -2
  7. firecode-1.4.0/firecode/algebra.py +115 -0
  8. {firecode-1.3.0 → firecode-1.4.0}/firecode/ase_manipulations.py +102 -133
  9. {firecode-1.3.0 → firecode-1.4.0}/firecode/atropisomer_module.py +43 -59
  10. {firecode-1.3.0 → firecode-1.4.0}/firecode/automep.py +21 -18
  11. {firecode-1.3.0 → firecode-1.4.0}/firecode/calculators/_ase_uma.py +7 -6
  12. {firecode-1.3.0 → firecode-1.4.0}/firecode/calculators/_orca.py +22 -20
  13. {firecode-1.3.0 → firecode-1.4.0}/firecode/calculators/_xtb.py +40 -83
  14. {firecode-1.3.0 → firecode-1.4.0}/firecode/concurrent_test.py +2 -2
  15. {firecode-1.3.0 → firecode-1.4.0}/firecode/embedder.py +106 -216
  16. {firecode-1.3.0 → firecode-1.4.0}/firecode/embedder_options.py +1 -26
  17. {firecode-1.3.0 → firecode-1.4.0}/firecode/embeds.py +30 -30
  18. {firecode-1.3.0 → firecode-1.4.0}/firecode/errors.py +1 -1
  19. firecode-1.4.0/firecode/explode_search.py +218 -0
  20. firecode-1.4.0/firecode/graph_manipulations.py +163 -0
  21. {firecode-1.3.0 → firecode-1.4.0}/firecode/hypermolecule_class.py +37 -35
  22. {firecode-1.3.0 → firecode-1.4.0}/firecode/mep_relaxer.py +15 -23
  23. {firecode-1.3.0 → firecode-1.4.0}/firecode/modify_settings.py +50 -69
  24. {firecode-1.3.0 → firecode-1.4.0}/firecode/multiembed.py +2 -1
  25. {firecode-1.3.0 → firecode-1.4.0}/firecode/numba_functions.py +18 -23
  26. {firecode-1.3.0 → firecode-1.4.0}/firecode/operators.py +47 -90
  27. {firecode-1.3.0 → firecode-1.4.0}/firecode/optimization_methods.py +82 -62
  28. {firecode-1.3.0 → firecode-1.4.0}/firecode/parameters.py +1 -1
  29. {firecode-1.3.0 → firecode-1.4.0}/firecode/pka.py +42 -42
  30. {firecode-1.3.0 → firecode-1.4.0}/firecode/pt.py +19 -11
  31. {firecode-1.3.0 → firecode-1.4.0}/firecode/reactive_atoms_classes.py +99 -100
  32. {firecode-1.3.0 → firecode-1.4.0}/firecode/settings.py +7 -7
  33. {firecode-1.3.0 → firecode-1.4.0}/firecode/solvents.py +1 -2
  34. {firecode-1.3.0 → firecode-1.4.0}/firecode/standalone_optimizer.py +13 -23
  35. {firecode-1.3.0 → firecode-1.4.0}/firecode/tests.py +12 -9
  36. {firecode-1.3.0 → firecode-1.4.0}/firecode/torsion_module.py +63 -155
  37. {firecode-1.3.0 → firecode-1.4.0}/firecode/units.py +1 -1
  38. {firecode-1.3.0 → firecode-1.4.0}/firecode/utils.py +47 -157
  39. {firecode-1.3.0 → firecode-1.4.0/firecode.egg-info}/PKG-INFO +19 -15
  40. {firecode-1.3.0 → firecode-1.4.0}/firecode.egg-info/SOURCES.txt +0 -8
  41. firecode-1.4.0/firecode.egg-info/requires.txt +14 -0
  42. {firecode-1.3.0 → firecode-1.4.0}/setup.py +13 -18
  43. firecode-1.3.0/firecode/_gaussian.py +0 -97
  44. firecode-1.3.0/firecode/algebra.py +0 -408
  45. firecode-1.3.0/firecode/calculators/_gaussian.py +0 -98
  46. firecode-1.3.0/firecode/calculators/_mopac.py +0 -242
  47. firecode-1.3.0/firecode/calculators/_openbabel.py +0 -154
  48. firecode-1.3.0/firecode/explode_search.py +0 -371
  49. firecode-1.3.0/firecode/graph_manipulations.py +0 -358
  50. firecode-1.3.0/firecode/mprof.py +0 -65
  51. firecode-1.3.0/firecode/nci.py +0 -186
  52. firecode-1.3.0/firecode/pruning.py +0 -420
  53. firecode-1.3.0/firecode/rmsd.py +0 -74
  54. firecode-1.3.0/firecode.egg-info/requires.txt +0 -16
  55. {firecode-1.3.0 → firecode-1.4.0}/LICENSE +0 -0
  56. {firecode-1.3.0 → firecode-1.4.0}/docs/examples.rst +0 -0
  57. {firecode-1.3.0 → firecode-1.4.0}/docs/index.rst +0 -0
  58. {firecode-1.3.0 → firecode-1.4.0}/docs/installation.rst +0 -0
  59. {firecode-1.3.0 → firecode-1.4.0}/docs/introduction.rst +0 -0
  60. {firecode-1.3.0 → firecode-1.4.0}/docs/license.rst +0 -0
  61. {firecode-1.3.0 → firecode-1.4.0}/docs/operators_keywords.rst +0 -0
  62. {firecode-1.3.0 → firecode-1.4.0}/docs/requirements.txt +0 -0
  63. {firecode-1.3.0 → firecode-1.4.0}/docs/usage.rst +0 -0
  64. {firecode-1.3.0 → firecode-1.4.0}/firecode/TEST_NOTEBOOK.ipynb +0 -0
  65. {firecode-1.3.0 → firecode-1.4.0}/firecode/__init__.py +0 -0
  66. {firecode-1.3.0 → firecode-1.4.0}/firecode/calculators/__init__.py +0 -0
  67. {firecode-1.3.0 → firecode-1.4.0}/firecode/calculators/dummy_ase_calc.py +0 -0
  68. {firecode-1.3.0 → firecode-1.4.0}/firecode/profiler.py +0 -0
  69. {firecode-1.3.0 → firecode-1.4.0}/firecode/quotes.json +0 -0
  70. {firecode-1.3.0 → firecode-1.4.0}/firecode/quotes.py +0 -0
  71. {firecode-1.3.0 → firecode-1.4.0}/firecode/references.py +0 -0
  72. {firecode-1.3.0 → firecode-1.4.0}/firecode/tests/C2H4.xyz +0 -0
  73. {firecode-1.3.0 → firecode-1.4.0}/firecode.egg-info/dependency_links.txt +0 -0
  74. {firecode-1.3.0 → firecode-1.4.0}/firecode.egg-info/top_level.txt +0 -0
  75. {firecode-1.3.0 → firecode-1.4.0}/pyproject.toml +0 -0
  76. {firecode-1.3.0 → firecode-1.4.0}/setup.cfg +0 -0
@@ -3,6 +3,12 @@
3
3
 
4
4
  <!-- - ... mep_relax> BETA
5
5
  - ... IMAGES kw, also implement it for neb>-->
6
+ ## FIRECODE 1.4.0 🔥 (January 25 2026) - Big cleanup and reorganization!
7
+ - Similarity pruning is now done via the standalone [PRISM](https://github.com/ntampellini/prism_pruner) library.
8
+ - Removed dependencies: numba, cclib, periodictable.
9
+ - Removed MOPAC, GAUSSIAN and OPENBABEL calculator interfaces completely.
10
+ - Removed SADDLE, CSEARCH and NCI keywords, as well as the saddle> operator.
11
+ - Bumped minimum Python version from 3.8 to 3.12.
6
12
 
7
13
  ## FIRECODE 1.3.0 🔥 (December 15 2025)
8
14
  - Added [UMA](https://fair-chem.github.io/core/uma.html) as a calculator with Meta MLIPs, via ASE and the fairchem-core library. The model path needs to be specified in the settings.py file.
@@ -12,7 +18,7 @@
12
18
  - Moved tests to their own folders.
13
19
  <!-- - Added free energy calculation via ASE vibrational analysis. -->
14
20
 
15
- ## FIRECODE 1.2.0 🔥 (July X 2025)
21
+ ## FIRECODE 1.2.0 🔥 (July 2025)
16
22
  - Ignored KeyError exceptions from get_atom_type.
17
23
  - Implemented [tblite](https://github.com/tblite/tblite) as a calculator (yes, ready for g-xtb!).
18
24
  - Implemented multiplicity support for main calculators (XTB and TBLITE - AIMNET2 will raise a NotImplementedError, ORCA pending).
@@ -4,4 +4,5 @@ include LICENSE
4
4
  include firecode/*
5
5
  include firecode/tests/*
6
6
  include firecode/calculators/*
7
- include docs/*
7
+ include docs/*
8
+ exclude firecode/calculators/*.pt
@@ -1,34 +1,32 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: firecode
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: Computational chemistry general purpose ensemble optimizer and molecular assemblies builder
5
5
  Home-page: https://www.github.com/ntampellini/firecode
6
6
  Author: Nicolò Tampellini
7
7
  Author-email: nicolo.tampellini@yale.edu
8
8
  Keywords: computational chemistry,ASE,transition state,xtb,AIMNET2,TBLITE
9
9
  Classifier: Programming Language :: Python :: 3
10
- Classifier: Programming Language :: Python :: 3.10
10
+ Classifier: Programming Language :: Python :: 3.12
11
11
  Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
12
12
  Classifier: Operating System :: OS Independent
13
- Requires-Python: >=3.10
13
+ Requires-Python: >=3.12
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE
16
- Requires-Dist: numpy==1.24
17
- Requires-Dist: scipy==1.13.1
18
- Requires-Dist: cclib==1.7
19
- Requires-Dist: periodictable==1.6.0
20
- Requires-Dist: matplotlib==3.4.2
21
- Requires-Dist: networkx==2.5.1
22
- Requires-Dist: ase==3.23
23
- Requires-Dist: numba==0.58.1
24
- Requires-Dist: prettytable==3.3.0
25
- Requires-Dist: typing-extensions==4.8.0
16
+ Requires-Dist: numpy
17
+ Requires-Dist: scipy
18
+ Requires-Dist: matplotlib
19
+ Requires-Dist: networkx
20
+ Requires-Dist: ase
21
+ Requires-Dist: prettytable
22
+ Requires-Dist: typing-extensions
26
23
  Requires-Dist: llvmlite
27
24
  Requires-Dist: importlib-metadata
28
25
  Requires-Dist: psutil
29
- Requires-Dist: setuptools<60.0
26
+ Requires-Dist: setuptools
30
27
  Requires-Dist: rich
31
28
  Requires-Dist: inquirerpy
29
+ Requires-Dist: prism-pruner
32
30
  Dynamic: author
33
31
  Dynamic: author-email
34
32
  Dynamic: classifier
@@ -49,6 +47,12 @@ Ensemble optimizer. Systematic generation of multimolecular arrangements for mon
49
47
 
50
48
  <!-- - ... mep_relax> BETA
51
49
  - ... IMAGES kw, also implement it for neb>-->
50
+ ## FIRECODE 1.4.0 🔥 (January 25 2026) - Big cleanup and reorganization!
51
+ - Similarity pruning is now done via the standalone [PRISM](https://github.com/ntampellini/prism_pruner) library.
52
+ - Removed dependencies: numba, cclib, periodictable.
53
+ - Removed MOPAC, GAUSSIAN and OPENBABEL calculator interfaces completely.
54
+ - Removed SADDLE, CSEARCH and NCI keywords, as well as the saddle> operator.
55
+ - Bumped minimum Python version from 3.8 to 3.12.
52
56
 
53
57
  ## FIRECODE 1.3.0 🔥 (December 15 2025)
54
58
  - Added [UMA](https://fair-chem.github.io/core/uma.html) as a calculator with Meta MLIPs, via ASE and the fairchem-core library. The model path needs to be specified in the settings.py file.
@@ -58,7 +62,7 @@ Ensemble optimizer. Systematic generation of multimolecular arrangements for mon
58
62
  - Moved tests to their own folders.
59
63
  <!-- - Added free energy calculation via ASE vibrational analysis. -->
60
64
 
61
- ## FIRECODE 1.2.0 🔥 (July X 2025)
65
+ ## FIRECODE 1.2.0 🔥 (July 2025)
62
66
  - Ignored KeyError exceptions from get_atom_type.
63
67
  - Implemented [tblite](https://github.com/tblite/tblite) as a calculator (yes, ready for g-xtb!).
64
68
  - Implemented multiplicity support for main calculators (XTB and TBLITE - AIMNET2 will raise a NotImplementedError, ORCA pending).
@@ -4,7 +4,7 @@
4
4
  <div align="center">
5
5
 
6
6
  [![License: GNU LGPL v3](https://img.shields.io/github/license/ntampellini/firecode)](https://opensource.org/licenses/LGPL-3.0)
7
- ![Python Version](https://img.shields.io/badge/Python-3.8.10-blue)
7
+ ![Python Version](https://img.shields.io/badge/Python-3.12-blue)
8
8
  ![Size](https://img.shields.io/github/languages/code-size/ntampellini/firecode)
9
9
  ![Lines](https://sloc.xyz/github/ntampellini/firecode/)
10
10
  [![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/ntampellini/firecode)](https://www.codefactor.io/repository/github/ntampellini/firecode)
@@ -20,7 +20,7 @@ sys.path.insert(0, os.path.join(os.path.abspath('..'), 'firecode'))
20
20
  # -- Project information -----------------------------------------------------
21
21
 
22
22
  project = 'firecode'
23
- copyright = '2021-2025, Nicolò Tampellini'
23
+ copyright = '2021-2026, Nicolò Tampellini'
24
24
  author = 'Nicolò Tampellini'
25
25
 
26
26
  # The full version, including alpha/beta/rc tags
@@ -2,7 +2,7 @@
2
2
  '''
3
3
 
4
4
  FIRECODE: Filtering Refiner and Embedder for Conformationally Dense Ensembles
5
- Copyright (C) 2021-2025 Nicolò Tampellini
5
+ Copyright (C) 2021-2026 Nicolò Tampellini
6
6
 
7
7
  This program is free software: you can redistribute it and/or modify
8
8
  it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@ import sys
25
25
  from rich.traceback import install
26
26
  install(show_locals=True)
27
27
 
28
- __version__ = '1.1.3'
28
+ __version__ = '1.4.0'
29
29
 
30
30
  if __name__ == '__main__':
31
31
 
@@ -0,0 +1,115 @@
1
+ '''
2
+
3
+ FIRECODE: Filtering Refiner and Embedder for Conformationally Dense Ensembles
4
+ Copyright (C) 2021-2026 Nicolò Tampellini
5
+
6
+ This program is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ This program is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ '''
17
+ import numpy as np
18
+ from prism_pruner.algebra import normalize
19
+
20
+ norm_of = np.linalg.norm
21
+
22
+
23
+ def point_angle(p1, p2, p3):
24
+ '''
25
+ Returns the planar angle between three points in space, in degrees.
26
+ '''
27
+ return np.arccos(np.clip(normalize(p1 - p2) @ normalize(p3 - p2), -1.0, 1.0))*180/np.pi
28
+
29
+
30
+ def kronecker_delta(i, j) -> int:
31
+ if i == j:
32
+ return 1
33
+ return 0
34
+
35
+
36
+ def align_vec_pair(ref, tgt):
37
+ '''
38
+ ref, tgt: iterables of two 3D vectors each
39
+
40
+ return: rotation matrix that when applied to tgt,
41
+ optimally aligns it to ref
42
+ '''
43
+
44
+ B = np.zeros((3,3))
45
+ for i in range(3):
46
+ for k in range(3):
47
+ tot = 0
48
+ for j in range(2):
49
+ tot += ref[j][i]*tgt[j][k]
50
+ B[i,k] = tot
51
+
52
+ u, s, vh = np.linalg.svd(B)
53
+
54
+ # Correct improper rotation if necessary (as in Kabsch algorithm)
55
+ if np.linalg.det(u @ vh) < 0:
56
+ s[-1] = -s[-1]
57
+ u[:, -1] = -u[:, -1]
58
+
59
+ return np.ascontiguousarray(np.dot(u, vh))
60
+
61
+
62
+ def cart_prod_idx(sizes: np.ndarray):
63
+ """Generates ids tuples for a cartesian product"""
64
+ assert len(sizes) >= 2
65
+ tuples_count = np.prod(sizes)
66
+ tuples = np.zeros((tuples_count, len(sizes)), dtype=np.int32)
67
+ tuple_idx = 0
68
+ # stores the current combination
69
+ current_tuple = np.zeros(len(sizes))
70
+ while tuple_idx < tuples_count:
71
+ tuples[tuple_idx] = current_tuple
72
+ current_tuple[0] += 1
73
+ # using a condition here instead of including this in the inner loop
74
+ # to gain a bit of speed: this is going to be tested each iteration,
75
+ # and starting a loop to have it end right away is a bit silly
76
+ if current_tuple[0] == sizes[0]:
77
+ # the reset to 0 and subsequent increment amount to carrying
78
+ # the number to the higher "power"
79
+ current_tuple[0] = 0
80
+ current_tuple[1] += 1
81
+ for i in range(1, len(sizes) - 1):
82
+ if current_tuple[i] == sizes[i]:
83
+ # same as before, but in a loop, since this is going
84
+ # to get run less often
85
+ current_tuple[i + 1] += 1
86
+ current_tuple[i] = 0
87
+ else:
88
+ break
89
+ tuple_idx += 1
90
+ return tuples
91
+
92
+
93
+ def vector_cartesian_product(x, y):
94
+ '''
95
+ Cartesian product, but with vectors instead of indices
96
+ '''
97
+ indices = cart_prod_idx(np.asarray((x.shape[0], y.shape[0]), dtype=np.int32))
98
+ dim = x.shape[-1] if len(x.shape) > 1 else 1
99
+ new_arr = np.zeros((*indices.shape, dim), dtype=x.dtype)
100
+ for i, (x_, y_) in enumerate(indices):
101
+ new_arr[i][0] = x[x_]
102
+ new_arr[i][1] = y[y_]
103
+ return np.ascontiguousarray(new_arr)
104
+
105
+
106
+ def transform_coords(coords, rot, pos):
107
+ '''
108
+ Returns the rotated and tranlated
109
+ coordinates. Slightly faster than
110
+ Numpy, uses memory-contiguous arrays.
111
+ '''
112
+ t = np.transpose(coords)
113
+ m = rot @ t
114
+ f = np.transpose(m)
115
+ return f + pos