Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/constant file #112

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- to set the elemental composition it is now possible to use dicts with not only int but also the element symbols (str)
- dict keys for elemental compositions will now always be checked for validity
- Renamed GP3-xTB to g-xTB
- Moved constants and (empirical) parameters to the `data` module

### Deprecated
- Nothing will be printed while multiple molecules are generated in parallel, tqdm-based progress bar instead
- Some debugging statements from generate had to be removed (esp. w.r.t. early stopping)

Expand Down
24 changes: 24 additions & 0 deletions src/mindlessgen/data/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""
This file is used to import all the constants from the constants.py file and the parameters.py file.
"""

from mindlessgen.data.constants import (
PSE,
PSE_NUMBERS,
PSE_SYMBOLS,
BOHR2AA,
AA2BOHR,
)

from mindlessgen.data.parameters import (
MAX_ELEM,
)

__all__ = [
"PSE",
"PSE_NUMBERS",
"PSE_SYMBOLS",
"BOHR2AA",
"AA2BOHR",
"MAX_ELEM",
]
132 changes: 132 additions & 0 deletions src/mindlessgen/data/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
"""
This module contains the constans which are used in the project.
"""

PSE: dict[int, str] = {
0: "X",
1: "H",
2: "He",
3: "Li",
4: "Be",
5: "B",
6: "C",
7: "N",
8: "O",
9: "F",
10: "Ne",
11: "Na",
12: "Mg",
13: "Al",
14: "Si",
15: "P",
16: "S",
17: "Cl",
18: "Ar",
19: "K",
20: "Ca",
21: "Sc",
22: "Ti",
23: "V",
24: "Cr",
25: "Mn",
26: "Fe",
27: "Co",
28: "Ni",
29: "Cu",
30: "Zn",
31: "Ga",
32: "Ge",
33: "As",
34: "Se",
35: "Br",
36: "Kr",
37: "Rb",
38: "Sr",
39: "Y",
40: "Zr",
41: "Nb",
42: "Mo",
43: "Tc",
44: "Ru",
45: "Rh",
46: "Pd",
47: "Ag",
48: "Cd",
49: "In",
50: "Sn",
51: "Sb",
52: "Te",
53: "I",
54: "Xe",
55: "Cs",
56: "Ba",
57: "La",
58: "Ce",
59: "Pr",
60: "Nd",
61: "Pm",
62: "Sm",
63: "Eu",
64: "Gd",
65: "Tb",
66: "Dy",
67: "Ho",
68: "Er",
69: "Tm",
70: "Yb",
71: "Lu",
72: "Hf",
73: "Ta",
74: "W",
75: "Re",
76: "Os",
77: "Ir",
78: "Pt",
79: "Au",
80: "Hg",
81: "Tl",
82: "Pb",
83: "Bi",
84: "Po",
85: "At",
86: "Rn",
87: "Fr",
88: "Ra",
89: "Ac",
90: "Th",
91: "Pa",
92: "U",
93: "Np",
94: "Pu",
95: "Am",
96: "Cm",
97: "Bk",
98: "Cf",
99: "Es",
100: "Fm",
101: "Md",
102: "No",
103: "Lr",
104: "Rf",
105: "Db",
106: "Sg",
107: "Bh",
108: "Hs",
109: "Mt",
110: "Ds",
111: "Rg",
112: "Cn",
113: "Nh",
114: "Fl",
115: "Mc",
116: "Lv",
117: "Ts",
118: "Og",
}
PSE_NUMBERS: dict[str, int] = {k.lower(): v for v, k in PSE.items()}
PSE_SYMBOLS: dict[int, str] = {v: k.lower() for v, k in PSE.items()}

BOHR2AA = (
0.529177210544 # taken from https://physics.nist.gov/cgi-bin/cuu/Value?bohrrada0
)
AA2BOHR = 1 / BOHR2AA
226 changes: 226 additions & 0 deletions src/mindlessgen/data/parameters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,226 @@
"""
This module contains the parameters for the mindlessgen package.
"""

MAX_ELEM = 86

# Covalent radii (taken from Pyykko and Atsumi, Chem. Eur. J. 15, 2009, 188-197)
# Values for metals decreased by 10%
# D3 covalent radii used to construct the coordination number
COV_RADII_PYYKKO = [
0.32,
0.46, # H, He
1.20,
0.94,
0.77,
0.75,
0.71,
0.63,
0.64,
0.67, # Li-Ne
1.40,
1.25,
1.13,
1.04,
1.10,
1.02,
0.99,
0.96, # Na-Ar
1.76,
1.54, # K, Ca
1.33,
1.22,
1.21,
1.10,
1.07, # Sc-
1.04,
1.00,
0.99,
1.01,
1.09, # -Zn
1.12,
1.09,
1.15,
1.10,
1.14,
1.17, # Ga-Kr
1.89,
1.67, # Rb, Sr
1.47,
1.39,
1.32,
1.24,
1.15, # Y-
1.13,
1.13,
1.08,
1.15,
1.23, # -Cd
1.28,
1.26,
1.26,
1.23,
1.32,
1.31, # In-Xe
2.09,
1.76, # Cs, Ba
1.62,
1.47,
1.58,
1.57,
1.56,
1.55,
1.51, # La-Eu
1.52,
1.51,
1.50,
1.49,
1.49,
1.48,
1.53, # Gd-Yb
1.46,
1.37,
1.31,
1.23,
1.18, # Lu-
1.16,
1.11,
1.12,
1.13,
1.32, # -Hg
1.30,
1.30,
1.36,
1.31,
1.38,
1.42, # Tl-Rn
2.01,
1.81, # Fr, Ra
1.67,
1.58,
1.52,
1.53,
1.54,
1.55,
1.49, # Ac-Am
1.49,
1.51,
1.51,
1.48,
1.50,
1.56,
1.58, # Cm-No
1.45,
1.41,
1.34,
1.29,
1.27, # Lr-
1.21,
1.16,
1.15,
1.09,
1.22, # -Cn
1.36,
1.43,
1.46,
1.58,
1.48,
1.57, # Nh-Og
]

COV_RADII_MLMGEN = [
0.42666663,
0.6133333,
1.59999996,
1.25333325,
1.02666658,
0.99999994,
0.94666658,
0.83999994,
0.85333326,
0.8933333,
1.86666651,
1.66666656,
1.50666656,
1.38666653,
1.4666666,
1.35999989,
1.31999993,
1.27999989,
2.3466665,
2.05333315,
1.77333328,
1.6266666,
1.61333328,
1.4666666,
1.42666664,
1.38666653,
1.33333325,
1.31999993,
1.34666657,
1.45333329,
1.49333325,
1.45333329,
1.53333321,
1.4666666,
1.51999988,
1.55999984,
2.51999982,
2.22666647,
1.95999991,
1.8533332,
1.75999996,
1.65333324,
1.53333321,
1.50666656,
1.50666656,
1.43999997,
1.53333321,
1.63999992,
1.70666652,
1.67999988,
1.67999988,
1.63999992,
1.75999996,
1.74666648,
2.78666637,
2.3466665,
2.15999987,
1.95999991,
2.10666659,
2.09333327,
2.07999979,
2.06666647,
2.01333319,
2.02666651,
2.01333319,
1.99999987,
1.98666655,
1.98666655,
1.97333324,
2.03999983,
1.94666659,
1.82666656,
1.74666648,
1.63999992,
1.57333316,
1.54666652,
1.47999992,
1.49333325,
1.50666656,
1.75999996,
1.73333316,
1.73333316,
1.81333324,
1.74666648,
1.83999988,
1.89333316,
2.67999982,
2.41333311,
2.22666647,
2.10666659,
2.02666651,
2.03999983,
2.05333315,
2.06666647,
]
Loading
Loading