firecode 1.1.1__tar.gz → 1.1.3__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-1.1.1 → firecode-1.1.3}/CHANGELOG.md +9 -0
- {firecode-1.1.1/firecode.egg-info → firecode-1.1.3}/PKG-INFO +10 -1
- {firecode-1.1.1 → firecode-1.1.3}/firecode/__main__.py +1 -1
- {firecode-1.1.1 → firecode-1.1.3}/firecode/embedder.py +1 -1
- {firecode-1.1.1 → firecode-1.1.3}/firecode/embedder_options.py +6 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/graph_manipulations.py +2 -2
- {firecode-1.1.1 → firecode-1.1.3}/firecode/hypermolecule_class.py +1 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/operators.py +16 -2
- {firecode-1.1.1 → firecode-1.1.3}/firecode/optimization_methods.py +1 -1
- {firecode-1.1.1 → firecode-1.1.3}/firecode/torsion_module.py +1 -1
- {firecode-1.1.1 → firecode-1.1.3}/firecode/utils.py +5 -5
- {firecode-1.1.1 → firecode-1.1.3/firecode.egg-info}/PKG-INFO +10 -1
- {firecode-1.1.1 → firecode-1.1.3}/setup.py +1 -1
- {firecode-1.1.1 → firecode-1.1.3}/LICENSE +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/MANIFEST.in +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/README.md +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/docs/conf.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/docs/examples.rst +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/docs/index.rst +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/docs/installation.rst +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/docs/introduction.rst +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/docs/license.rst +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/docs/operators_keywords.rst +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/docs/requirements.txt +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/docs/usage.rst +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/TEST_NOTEBOOK.ipynb +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/__init__.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/_gaussian.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/algebra.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/ase_manipulations.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/atropisomer_module.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/automep.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/calculators/__init__.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/calculators/_gaussian.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/calculators/_mopac.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/calculators/_openbabel.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/calculators/_orca.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/calculators/_xtb.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/concurrent_test.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/eig_based_RMSD_test.ipynb +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/embeds.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/errors.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/mep_relaxer.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/modify_settings.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/mprof.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/multiembed.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/nci.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/numba_functions.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/parameters.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/pka.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/profiler.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/pruning.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/pt.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/quotes.json +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/quotes.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/reactive_atoms_classes.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/references.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/rmsd.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/settings.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/solvents.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/tests/C2F2H4.xyz +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/tests/C2H4.xyz +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/tests/CH3Cl.xyz +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/tests/HCOOH.xyz +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/tests/HCOOOH.xyz +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/tests/chelotropic.txt +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/tests/cyclical.txt +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/tests/dihedral.txt +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/tests/string.txt +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/tests/trimolecular.txt +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode/tests.py +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode.egg-info/SOURCES.txt +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode.egg-info/dependency_links.txt +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode.egg-info/requires.txt +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/firecode.egg-info/top_level.txt +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/pyproject.toml +0 -0
- {firecode-1.1.1 → firecode-1.1.3}/setup.cfg +0 -0
|
@@ -4,6 +4,15 @@
|
|
|
4
4
|
<!-- - ... mep_relax> BETA
|
|
5
5
|
- ... IMAGES kw, also implement it for neb>-->
|
|
6
6
|
|
|
7
|
+
## FIRECODE 1.1.3 🔥 (June 3 2025)
|
|
8
|
+
- The CREST MTD operator checks that CREST 2 is installed before trying to run a search. For now, only CREST 2 is supported, as CREST 3 needs some updated interface
|
|
9
|
+
- Solved CRETSLEVEL bug.
|
|
10
|
+
|
|
11
|
+
## FIRECODE 1.1.2 🔥 (April 29 2025)
|
|
12
|
+
- Added CRESTLEVEL keyword to specify CREST theory level (i.e. "CRESTLEVEL=GFN2").
|
|
13
|
+
- Updated aimnet2 bindings to only useunderscore in the module name calls and not hyphens.
|
|
14
|
+
- Fixed bug with the default value for the attribute "charge".
|
|
15
|
+
|
|
7
16
|
## FIRECODE 1.1.1 🔥 (January 2025)
|
|
8
17
|
- Added pretty error traceback with rich.
|
|
9
18
|
<!-- SMARTS Constraint class -->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: firecode
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: Computational chemistry general purpose ensemble optimizer and transition state builder
|
|
5
5
|
Home-page: https://www.github.com/ntampellini/firecode
|
|
6
6
|
Author: Nicolò Tampellini
|
|
@@ -41,6 +41,15 @@ Ensemble optimizer. Systematic generation of multimolecular arrangements for mon
|
|
|
41
41
|
<!-- - ... mep_relax> BETA
|
|
42
42
|
- ... IMAGES kw, also implement it for neb>-->
|
|
43
43
|
|
|
44
|
+
## FIRECODE 1.1.3 🔥 (June 3 2025)
|
|
45
|
+
- The CREST MTD operator checks that CREST 2 is installed before trying to run a search. For now, only CREST 2 is supported, as CREST 3 needs some updated interface
|
|
46
|
+
- Solved CRETSLEVEL bug.
|
|
47
|
+
|
|
48
|
+
## FIRECODE 1.1.2 🔥 (April 29 2025)
|
|
49
|
+
- Added CRESTLEVEL keyword to specify CREST theory level (i.e. "CRESTLEVEL=GFN2").
|
|
50
|
+
- Updated aimnet2 bindings to only useunderscore in the module name calls and not hyphens.
|
|
51
|
+
- Fixed bug with the default value for the attribute "charge".
|
|
52
|
+
|
|
44
53
|
## FIRECODE 1.1.1 🔥 (January 2025)
|
|
45
54
|
- Added pretty error traceback with rich.
|
|
46
55
|
<!-- SMARTS Constraint class -->
|
|
@@ -748,7 +748,7 @@ class Embedder:
|
|
|
748
748
|
self.embed = 'refine'
|
|
749
749
|
|
|
750
750
|
# in a refine run, the global charge must be the one of the single molecule
|
|
751
|
-
self.options.charge = self.objects[0]
|
|
751
|
+
self.options.charge = getattr(self.objects[0], "charge", 0)
|
|
752
752
|
|
|
753
753
|
# If the run is a refine>/REFINE one, the self.embed
|
|
754
754
|
# attribute is set in advance by the self._set_options
|
|
@@ -48,6 +48,8 @@ keywords_dict = {
|
|
|
48
48
|
|
|
49
49
|
'CRESTNCI' : 1, # passes the "--nci" flag to CREST metadynamic conformational searches.
|
|
50
50
|
|
|
51
|
+
'CRESTLEVEL' : 1, # level of the CREST run
|
|
52
|
+
|
|
51
53
|
'DEEP' : 1, # Performs a deeper search, retaining more starting points
|
|
52
54
|
# for calculations and smaller turning angles.
|
|
53
55
|
|
|
@@ -562,6 +564,10 @@ class OptionSetter:
|
|
|
562
564
|
def csearch(self, options, *args):
|
|
563
565
|
options.csearch_aug = True
|
|
564
566
|
|
|
567
|
+
def crestlevel(self, options, *args):
|
|
568
|
+
kw = self.keywords_simple[self.keywords.index('CRESTLEVEL')]
|
|
569
|
+
options.crestlevel = kw.split('=')[1]
|
|
570
|
+
|
|
565
571
|
def set_options(self):
|
|
566
572
|
|
|
567
573
|
# self.keywords = sorted(self.keywords, key=lambda x: __keywords__.index(x))
|
|
@@ -32,8 +32,8 @@ from firecode.algebra import all_dists, dihedral, norm_of
|
|
|
32
32
|
from firecode.pt import pt
|
|
33
33
|
|
|
34
34
|
|
|
35
|
-
def d_min_bond(e1, e2):
|
|
36
|
-
return
|
|
35
|
+
def d_min_bond(e1, e2, factor=1.2):
|
|
36
|
+
return factor * (pt[e1].covalent_radius + pt[e2].covalent_radius)
|
|
37
37
|
# return 0.2 + (pt[e1].covalent_radius + pt[e2].covalent_radius)
|
|
38
38
|
# if this is somewhat prone to bugs, this might help https://cccbdb.nist.gov/calcbondcomp1x.asp
|
|
39
39
|
|
|
@@ -108,6 +108,7 @@ class Hypermolecule:
|
|
|
108
108
|
try:
|
|
109
109
|
filename = smi_to_3d(filename, "generated_3D_coords")
|
|
110
110
|
print(f"--> Embedded SMILES string to 3D structure, saved as {filename}")
|
|
111
|
+
|
|
111
112
|
except Exception:
|
|
112
113
|
raise SyntaxError((f'The program is trying to read something that is not a valid molecule input ({filename}). ' +
|
|
113
114
|
'If this looks like a keyword, it is probably faulted by a syntax error.'))
|
|
@@ -23,6 +23,7 @@ https://www.gnu.org/licenses/lgpl-3.0.en.html#license-text.
|
|
|
23
23
|
|
|
24
24
|
# import pickle
|
|
25
25
|
import time
|
|
26
|
+
from shutil import which
|
|
26
27
|
from subprocess import CalledProcessError
|
|
27
28
|
|
|
28
29
|
import numpy as np
|
|
@@ -39,10 +40,11 @@ from firecode.optimization_methods import _refine_structures, optimize
|
|
|
39
40
|
from firecode.pka import pka_routine
|
|
40
41
|
from firecode.pruning import prune_by_rmsd, prune_by_rmsd_rot_corr
|
|
41
42
|
from firecode.settings import (CALCULATOR, DEFAULT_FF_LEVELS, DEFAULT_LEVELS,
|
|
42
|
-
|
|
43
|
+
FF_CALC, FF_OPT_BOOL, PROCS)
|
|
43
44
|
from firecode.torsion_module import _get_quadruplets, csearch
|
|
44
45
|
from firecode.utils import (align_structures, get_scan_peak_index,
|
|
45
|
-
|
|
46
|
+
molecule_check, read_xyz, time_to_string,
|
|
47
|
+
write_xyz)
|
|
46
48
|
|
|
47
49
|
|
|
48
50
|
def operate(input_string, embedder):
|
|
@@ -430,6 +432,9 @@ def mtd_search_operator(filename, embedder):
|
|
|
430
432
|
'''
|
|
431
433
|
Run a CREST metadynamic conformational search and return the output filename.
|
|
432
434
|
'''
|
|
435
|
+
|
|
436
|
+
assert crest_is_installed(), 'CREST 2 does not seem to be installed. Install it with: conda install -c conda-forge crest==2.*'
|
|
437
|
+
|
|
433
438
|
mol = next((mol for mol in embedder.objects if mol.filename == filename))
|
|
434
439
|
# load molecule to be optimized from embedder
|
|
435
440
|
|
|
@@ -539,6 +544,7 @@ def mtd_search_operator(filename, embedder):
|
|
|
539
544
|
|
|
540
545
|
solvent=embedder.options.solvent,
|
|
541
546
|
charge=mol.charge,
|
|
547
|
+
method=getattr(embedder.options, "crestlevel", 'GFN2-XTB//GFN-FF'),
|
|
542
548
|
kcal=embedder.options.kcal_thresh,
|
|
543
549
|
ncimode=embedder.options.crestnci,
|
|
544
550
|
title=mol.rootname+"_mtd_csearch",
|
|
@@ -797,6 +803,14 @@ def distance_scan(embedder):
|
|
|
797
803
|
# Log data to the embedder class
|
|
798
804
|
mol.scan_data = (dists, energies)
|
|
799
805
|
|
|
806
|
+
def crest_is_installed() -> bool:
|
|
807
|
+
'''
|
|
808
|
+
Returns True if a CREST installation is found.
|
|
809
|
+
For now, only CREST 2 is supported.
|
|
810
|
+
|
|
811
|
+
'''
|
|
812
|
+
return (which('crest') is not None)
|
|
813
|
+
|
|
800
814
|
def _get_lowest_calc(embedder=None):
|
|
801
815
|
'''
|
|
802
816
|
Returns the values for calculator,
|
|
@@ -57,7 +57,7 @@ class Opt_func_dispatcher:
|
|
|
57
57
|
|
|
58
58
|
except ImportError:
|
|
59
59
|
raise Exception(('Cannot import AIMNet2 python bindings for FIRECODE. Install them with:\n'
|
|
60
|
-
'>>> pip install
|
|
60
|
+
'>>> pip install aimnet2_firecode'))
|
|
61
61
|
|
|
62
62
|
self.opt_funcs_dict['AIMNET2'] = aimnet2_opt
|
|
63
63
|
self.aimnet2_calc = get_aimnet2_calc(theory_level, logfunction=logfunction)
|
|
@@ -270,7 +270,7 @@ def _get_hydrogen_bonds(coords, atomnos, graph, d_min=2.5, d_max=3.3, max_angle=
|
|
|
270
270
|
# initializing output list
|
|
271
271
|
|
|
272
272
|
if elements is None:
|
|
273
|
-
elements = ((7, 8), (7, 8))
|
|
273
|
+
elements = ((7, 8), (7, 8, 9))
|
|
274
274
|
|
|
275
275
|
het_idx_from = np.array([i for i, a in enumerate(atomnos) if a in elements[0]], dtype=int)
|
|
276
276
|
het_idx_to = np.array([i for i, a in enumerate(atomnos) if a in elements[1]], dtype=int)
|
|
@@ -74,22 +74,22 @@ class Constraint:
|
|
|
74
74
|
|
|
75
75
|
if self.type == 'B':
|
|
76
76
|
a, b = self.indices
|
|
77
|
-
deltas = [
|
|
77
|
+
deltas = [abs(norm_of(coords[match[a]]-coords[match[b]])-self.value) for match in match_indices_list]
|
|
78
78
|
best_match_indices = match_indices_list[deltas.index(min(deltas))]
|
|
79
79
|
|
|
80
80
|
if self.type == 'A':
|
|
81
81
|
a, b, c = self.indices
|
|
82
|
-
deltas = [
|
|
82
|
+
deltas = [abs(point_angle(coords[match[a]],
|
|
83
83
|
coords[match[b]],
|
|
84
|
-
coords[match[c]])-self.value)
|
|
84
|
+
coords[match[c]])-self.value) for match in match_indices_list]
|
|
85
85
|
best_match_indices = match_indices_list[deltas.index(min(deltas))]
|
|
86
86
|
|
|
87
87
|
if self.type == 'D':
|
|
88
88
|
a, b, c, d = self.indices
|
|
89
|
-
deltas = [
|
|
89
|
+
deltas = [abs(dihedral((coords[match[a]],
|
|
90
90
|
coords[match[b]],
|
|
91
91
|
coords[match[c]],
|
|
92
|
-
coords[match[d]]))-self.value)
|
|
92
|
+
coords[match[d]]))-self.value) for match in match_indices_list]
|
|
93
93
|
best_match_indices = match_indices_list[deltas.index(min(deltas))]
|
|
94
94
|
|
|
95
95
|
old_indices = self.indices[:]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: firecode
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: Computational chemistry general purpose ensemble optimizer and transition state builder
|
|
5
5
|
Home-page: https://www.github.com/ntampellini/firecode
|
|
6
6
|
Author: Nicolò Tampellini
|
|
@@ -41,6 +41,15 @@ Ensemble optimizer. Systematic generation of multimolecular arrangements for mon
|
|
|
41
41
|
<!-- - ... mep_relax> BETA
|
|
42
42
|
- ... IMAGES kw, also implement it for neb>-->
|
|
43
43
|
|
|
44
|
+
## FIRECODE 1.1.3 🔥 (June 3 2025)
|
|
45
|
+
- The CREST MTD operator checks that CREST 2 is installed before trying to run a search. For now, only CREST 2 is supported, as CREST 3 needs some updated interface
|
|
46
|
+
- Solved CRETSLEVEL bug.
|
|
47
|
+
|
|
48
|
+
## FIRECODE 1.1.2 🔥 (April 29 2025)
|
|
49
|
+
- Added CRESTLEVEL keyword to specify CREST theory level (i.e. "CRESTLEVEL=GFN2").
|
|
50
|
+
- Updated aimnet2 bindings to only useunderscore in the module name calls and not hyphens.
|
|
51
|
+
- Fixed bug with the default value for the attribute "charge".
|
|
52
|
+
|
|
44
53
|
## FIRECODE 1.1.1 🔥 (January 2025)
|
|
45
54
|
- Added pretty error traceback with rich.
|
|
46
55
|
<!-- SMARTS Constraint class -->
|
|
@@ -20,7 +20,7 @@ along with this program. If not, see
|
|
|
20
20
|
https://www.gnu.org/licenses/lgpl-3.0.en.html#license-text.
|
|
21
21
|
|
|
22
22
|
'''
|
|
23
|
-
__version__ = '1.1.
|
|
23
|
+
__version__ = '1.1.3'
|
|
24
24
|
from setuptools import setup, find_packages
|
|
25
25
|
|
|
26
26
|
long_description = ('## FIRECODE: Filtering Refiner and Embedder for Conformationally Dense Ensembles.\nEnsemble optimizer. Systematic generation of multimolecular arrangements for ' +
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|