PyGamLab 1.2.4__py3-none-any.whl → 1.3.0__py3-none-any.whl
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.
- PyGamLab/Data_Analysis.py +66 -3
- PyGamLab/Functions.py +4 -4
- PyGamLab/structures/GAM_architectures/GAM_nano_particles.py +51 -1
- PyGamLab/structures/__init__.py +0 -8
- PyGamLab/structures/gamvis/gamvis.py +1 -1
- PyGamLab/structures/io/conversions.py +1 -1
- {pygamlab-1.2.4.dist-info → pygamlab-1.3.0.dist-info}/METADATA +1 -1
- {pygamlab-1.2.4.dist-info → pygamlab-1.3.0.dist-info}/RECORD +10 -10
- {pygamlab-1.2.4.dist-info → pygamlab-1.3.0.dist-info}/WHEEL +0 -0
- {pygamlab-1.2.4.dist-info → pygamlab-1.3.0.dist-info}/top_level.txt +0 -0
PyGamLab/Data_Analysis.py
CHANGED
|
@@ -64,6 +64,7 @@ from scipy.signal import savgol_filter, find_peaks , peak_widths
|
|
|
64
64
|
from scipy.integrate import simps
|
|
65
65
|
from scipy.interpolate import interp1d
|
|
66
66
|
from scipy.optimize import brentq
|
|
67
|
+
from scipy.integrate import simpson # Corrected import
|
|
67
68
|
|
|
68
69
|
|
|
69
70
|
|
|
@@ -2945,6 +2946,68 @@ def read_msa(filename):
|
|
|
2945
2946
|
return np.array(energy), np.array(counts)
|
|
2946
2947
|
|
|
2947
2948
|
|
|
2949
|
+
# Characteristic X-ray line energies (keV) – simplified reference values
|
|
2950
|
+
EDS_element_lines = {
|
|
2951
|
+
"C": 0.277, # Kα
|
|
2952
|
+
"N": 0.392, # Kα
|
|
2953
|
+
"O": 0.525, # Kα
|
|
2954
|
+
"F": 0.677, # Kα
|
|
2955
|
+
"Na": 1.041, # Kα
|
|
2956
|
+
"Mg": 1.254, # Kα
|
|
2957
|
+
"Al": 1.486, # Kα
|
|
2958
|
+
"Si": 1.740, # Kα
|
|
2959
|
+
"P": 2.013, # Kα
|
|
2960
|
+
"S": 2.307, # Kα
|
|
2961
|
+
"Cl": 2.622, # Kα
|
|
2962
|
+
"K": 3.312, # Kα
|
|
2963
|
+
"Ca": 3.690, # Kα
|
|
2964
|
+
"Ti": 4.508, # Kα
|
|
2965
|
+
"V": 4.952, # Kα
|
|
2966
|
+
"Cr": 5.414, # Kα
|
|
2967
|
+
"Mn": 5.899, # Kα
|
|
2968
|
+
"Fe": 6.404, # Kα
|
|
2969
|
+
"Co": 6.930, # Kα
|
|
2970
|
+
"Ni": 7.471, # Kα
|
|
2971
|
+
"Cu": 8.041, # Kα
|
|
2972
|
+
"Zn": 8.638, # Kα
|
|
2973
|
+
"Zr": 15.775, # Kα
|
|
2974
|
+
"Ag": 22.162, # Kα
|
|
2975
|
+
"Sn": 25.271, # Kα
|
|
2976
|
+
"Au": 9.713, # Mα (often observed in SEM)
|
|
2977
|
+
"Pb": 10.55, # Mα
|
|
2978
|
+
}
|
|
2979
|
+
|
|
2980
|
+
# Atomic weights (IUPAC 2019, rounded)
|
|
2981
|
+
EDS_atomic_weights = {
|
|
2982
|
+
"C": 12.01,
|
|
2983
|
+
"N": 14.01,
|
|
2984
|
+
"O": 16.00,
|
|
2985
|
+
"F": 19.00,
|
|
2986
|
+
"Na": 22.99,
|
|
2987
|
+
"Mg": 24.31,
|
|
2988
|
+
"Al": 26.98,
|
|
2989
|
+
"Si": 28.09,
|
|
2990
|
+
"P": 30.97,
|
|
2991
|
+
"S": 32.06,
|
|
2992
|
+
"Cl": 35.45,
|
|
2993
|
+
"K": 39.10,
|
|
2994
|
+
"Ca": 40.08,
|
|
2995
|
+
"Ti": 47.87,
|
|
2996
|
+
"V": 50.94,
|
|
2997
|
+
"Cr": 52.00,
|
|
2998
|
+
"Mn": 54.94,
|
|
2999
|
+
"Fe": 55.85,
|
|
3000
|
+
"Co": 58.93,
|
|
3001
|
+
"Ni": 58.69,
|
|
3002
|
+
"Cu": 63.55,
|
|
3003
|
+
"Zn": 65.38,
|
|
3004
|
+
"Zr": 91.22,
|
|
3005
|
+
"Ag": 107.87,
|
|
3006
|
+
"Sn": 118.71,
|
|
3007
|
+
"Au": 196.97,
|
|
3008
|
+
"Pb": 207.2,
|
|
3009
|
+
}
|
|
3010
|
+
|
|
2948
3011
|
|
|
2949
3012
|
def EDS_Analysis(file_path, application, elements=["C","O","Fe"]):
|
|
2950
3013
|
"""
|
|
@@ -3019,7 +3082,7 @@ def EDS_Analysis(file_path, application, elements=["C","O","Fe"]):
|
|
|
3019
3082
|
elif application == 'quantify':
|
|
3020
3083
|
intensities = {}
|
|
3021
3084
|
for el in elements:
|
|
3022
|
-
peak_e =
|
|
3085
|
+
peak_e = EDS_element_lines[el]
|
|
3023
3086
|
mask = (energy > peak_e - 0.05) & (energy < peak_e + 0.05)
|
|
3024
3087
|
intensities[el] = counts[mask].sum()
|
|
3025
3088
|
|
|
@@ -3033,7 +3096,7 @@ def EDS_Analysis(file_path, application, elements=["C","O","Fe"]):
|
|
|
3033
3096
|
weight_percent = {el: (val/total)*100 for el, val in corrected.items()}
|
|
3034
3097
|
|
|
3035
3098
|
# --- Convert to atomic % ---
|
|
3036
|
-
mols = {el: weight_percent[el]/
|
|
3099
|
+
mols = {el: weight_percent[el]/EDS_atomic_weights[el] for el in elements}
|
|
3037
3100
|
total_mol = sum(mols.values()) if sum(mols.values()) > 0 else 1
|
|
3038
3101
|
atomic_percent = {el: (val/total_mol)*100 for el, val in mols.items()}
|
|
3039
3102
|
wt=weight_percent
|
|
@@ -4842,7 +4905,7 @@ def DMTA_TestAnalysis(df, operator, sample_name):
|
|
|
4842
4905
|
|
|
4843
4906
|
|
|
4844
4907
|
|
|
4845
|
-
|
|
4908
|
+
def Find_MaxVerticalVelocity(df):
|
|
4846
4909
|
"""
|
|
4847
4910
|
Find the maximum vertical flow velocity and its location from simulation data,
|
|
4848
4911
|
and plot velocity versus position.
|
PyGamLab/Functions.py
CHANGED
|
@@ -340,8 +340,7 @@ def Austenite_Martensite_VC(C):
|
|
|
340
340
|
|
|
341
341
|
|
|
342
342
|
|
|
343
|
-
|
|
344
|
-
'''
|
|
343
|
+
"""
|
|
345
344
|
def BMI_Calculation(W,H):
|
|
346
345
|
'''
|
|
347
346
|
|
|
@@ -359,7 +358,8 @@ def BMI_Calculation(W,H):
|
|
|
359
358
|
|
|
360
359
|
'''
|
|
361
360
|
return(W/H**2)
|
|
362
|
-
|
|
361
|
+
"""
|
|
362
|
+
|
|
363
363
|
|
|
364
364
|
|
|
365
365
|
|
|
@@ -2360,7 +2360,7 @@ def Geometric_Sequence(first_variable,second_variable):
|
|
|
2360
2360
|
|
|
2361
2361
|
|
|
2362
2362
|
|
|
2363
|
-
def
|
|
2363
|
+
def Gauss_Law(electric_field, surface_area, electric_flux):
|
|
2364
2364
|
"""
|
|
2365
2365
|
Calculates a value related to Gauss's Law for electricity.
|
|
2366
2366
|
Note: The provided formula returns the difference, not a direct calculation of a single variable.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from ..Primatom import GAM_Atom , GAM_Bond
|
|
2
|
-
from ..Primatom.gam_atom import REFERENCE_PERIODIC_TABLE_CONFIG
|
|
3
2
|
#from gam_atom import GAM_Atom , GAM_Bond
|
|
4
3
|
#from gam_atom import REFERENCE_PERIODIC_TABLE_CONFIG
|
|
5
4
|
import copy
|
|
@@ -13,6 +12,57 @@ from dataclasses import dataclass, asdict
|
|
|
13
12
|
from ase import Atoms
|
|
14
13
|
|
|
15
14
|
|
|
15
|
+
#from ..Primatom.gam_atom import REFERENCE_PERIODIC_TABLE_CONFIG
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
REFERENCE_PERIODIC_TABLE_CONFIG={
|
|
19
|
+
'H': {'number': 1, 'mass': 1.008, 'config': '1s1', 'radius': 0.53},
|
|
20
|
+
'Au': {'number': 2, 'mass': 4.003, 'config': '1s2', 'radius': 0.31},
|
|
21
|
+
'He': {'number': 2, 'mass': 4.003, 'config': '1s2', 'radius': 0.31},
|
|
22
|
+
'Li': {'number': 3, 'mass': 6.941, 'config': '[He] 2s1', 'radius': 1.67},
|
|
23
|
+
'Be': {'number': 4, 'mass': 9.012, 'config': '[He] 2s2', 'radius': 1.12},
|
|
24
|
+
'B': {'number': 5, 'mass': 10.811, 'config': '[He] 2s2 2p1', 'radius': 0.85},
|
|
25
|
+
'C': {'number': 6, 'mass': 12.011, 'config': '[He] 2s2 2p2', 'radius': 0.67},
|
|
26
|
+
'N': {'number': 7, 'mass': 14.007, 'config': '[He] 2s2 2p3', 'radius': 0.56},
|
|
27
|
+
'O': {'number': 8, 'mass': 15.999, 'config': '[He] 2s2 2p4', 'radius': 0.48},
|
|
28
|
+
'F': {'number': 9, 'mass': 18.998, 'config': '[He] 2s2 2p5', 'radius': 0.42},
|
|
29
|
+
'Ne': {'number': 10, 'mass': 20.180, 'config': '[He] 2s2 2p6', 'radius': 0.38},
|
|
30
|
+
'Na': {'number': 11, 'mass': 22.990, 'config': '[Ne] 3s1', 'radius': 1.90},
|
|
31
|
+
'Mg': {'number': 12, 'mass': 24.305, 'config': '[Ne] 3s2', 'radius': 1.45},
|
|
32
|
+
'Al': {'number': 13, 'mass': 26.982, 'config': '[Ne] 3s2 3p1', 'radius': 1.18},
|
|
33
|
+
'Si': {'number': 14, 'mass': 28.085, 'config': '[Ne] 3s2 3p2', 'radius': 1.11},
|
|
34
|
+
'P': {'number': 15, 'mass': 30.974, 'config': '[Ne] 3s2 3p3', 'radius': 1.06},
|
|
35
|
+
'S': {'number': 16, 'mass': 32.06, 'config': '[Ne] 3s2 3p4', 'radius': 1.02},
|
|
36
|
+
'Cl': {'number': 17, 'mass': 35.453, 'config': '[Ne] 3s2 3p5', 'radius': 0.99},
|
|
37
|
+
'Ar': {'number': 18, 'mass': 39.948, 'config': '[Ne] 3s2 3p6', 'radius': 0.95},
|
|
38
|
+
'K': {'number': 19, 'mass': 39.098, 'config': '[Ar] 4s1', 'radius': 2.43},
|
|
39
|
+
'Ca': {'number': 20, 'mass': 40.078, 'config': '[Ar] 4s2', 'radius': 1.94},
|
|
40
|
+
'Sc': {'number': 21, 'mass': 44.956, 'config': '[Ar] 3d1 4s2', 'radius': 1.84},
|
|
41
|
+
'Ti': {'number': 22, 'mass': 47.867, 'config': '[Ar] 3d2 4s2', 'radius': 1.76},
|
|
42
|
+
'V': {'number': 23, 'mass': 50.942, 'config': '[Ar] 3d3 4s2', 'radius': 1.71},
|
|
43
|
+
'Cr': {'number': 24, 'mass': 51.996, 'config': '[Ar] 3d5 4s1', 'radius': 1.66},
|
|
44
|
+
'Mn': {'number': 25, 'mass': 54.938, 'config': '[Ar] 3d5 4s2', 'radius': 1.61},
|
|
45
|
+
'Fe': {'number': 26, 'mass': 55.845, 'config': '[Ar] 3d6 4s2', 'radius': 1.56},
|
|
46
|
+
'Co': {'number': 27, 'mass': 58.933, 'config': '[Ar] 3d7 4s2', 'radius': 1.52},
|
|
47
|
+
'Ni': {'number': 28, 'mass': 58.693, 'config': '[Ar] 3d8 4s2', 'radius': 1.49},
|
|
48
|
+
'Cu': {'number': 29, 'mass': 63.546, 'config': '[Ar] 3d10 4s1', 'radius': 1.45},
|
|
49
|
+
'Zn': {'number': 30, 'mass': 65.38, 'config': '[Ar] 3d10 4s2', 'radius': 1.42},
|
|
50
|
+
'Ga': {'number': 31, 'mass': 69.723, 'config': '[Ar] 3d10 4s2 4p1', 'radius': 1.36},
|
|
51
|
+
'Ge': {'number': 32, 'mass': 72.630, 'config': '[Ar] 3d10 4s2 4p2', 'radius': 1.25},
|
|
52
|
+
'As': {'number': 33, 'mass': 74.922, 'config': '[Ar] 3d10 4s2 4p3', 'radius': 1.19},
|
|
53
|
+
'Se': {'number': 34, 'mass': 78.971, 'config': '[Ar] 3d10 4s2 4p4', 'radius': 1.16},
|
|
54
|
+
'Br': {'number': 35, 'mass': 79.904, 'config': '[Ar] 3d10 4s2 4p5', 'radius': 1.14},
|
|
55
|
+
'Kr': {'number': 36, 'mass': 83.798, 'config': '[Ar] 3d10 4s2 4p6', 'radius': 1.10},
|
|
56
|
+
'Cd': {'number': 48, 'mass': 112.411, 'config': '[Kr] 4d10 5s2', 'radius': 1.55},
|
|
57
|
+
'Pt': {'number': 78, 'mass': 195.084, 'config': '[Xe] 4f14 5d9 6s1', 'radius': 1.77},
|
|
58
|
+
'Ag': {'number': 47, 'mass': 107.868, 'config': '[Kr] 4d10 5s1', 'radius': 1.65},
|
|
59
|
+
'W': {'number': 74, 'mass': 183.84, 'config': '[Xe] 4f14 5d4 6s2', 'radius': 0.53},
|
|
60
|
+
'Nb': {'number': 41,'mass': 92.906, 'config': '[Kr] 4d4 5s1', 'radius': 1.46},
|
|
61
|
+
'Mo': {'number': 42,'mass': 95.94, 'config': '[Kr] 4d5 5s1', 'radius': 1.39},
|
|
62
|
+
'Ta': {'number': 73,'mass': 180.948, 'config': '[Xe] 4f14 5d3 6s2', 'radius': 1.43}
|
|
63
|
+
|
|
64
|
+
}
|
|
65
|
+
|
|
16
66
|
@dataclass
|
|
17
67
|
class AtomicData:
|
|
18
68
|
"""Store atomic data for different elements."""
|
PyGamLab/structures/__init__.py
CHANGED
|
@@ -13,14 +13,6 @@ from .io import *
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
from . import Primatom
|
|
17
|
-
from . import Generator
|
|
18
|
-
from . import GAM_architectures
|
|
19
|
-
from . import SMILES_processor
|
|
20
|
-
from . import gamvis
|
|
21
|
-
from . import io
|
|
22
|
-
|
|
23
|
-
|
|
24
16
|
__all__ = ['Primatom','Generator','GAM_architectures',
|
|
25
17
|
'gamvis',
|
|
26
18
|
'io']
|
|
@@ -771,7 +771,7 @@ def ase_visualizer(atoms: List["GAM_Atom"],
|
|
|
771
771
|
""" MAIN VISUALIZATION FUNCTION """
|
|
772
772
|
#=============================================
|
|
773
773
|
|
|
774
|
-
def
|
|
774
|
+
def Molecular_Visualizer(atoms: List["GAM_Atom"],
|
|
775
775
|
format: str = "efficient_plotly",
|
|
776
776
|
**kwargs):
|
|
777
777
|
"""
|
|
@@ -2,7 +2,7 @@ from pymatgen.core import Element, Molecule, Structure, Lattice
|
|
|
2
2
|
from typing import List
|
|
3
3
|
from ..Primatom import GAM_Atom
|
|
4
4
|
import numpy as np
|
|
5
|
-
from .
|
|
5
|
+
from .checker import is_ase, is_gam, is_pymatgen, is_mdanalysis, is_openbabel , is_rdkit
|
|
6
6
|
from ase import Atoms
|
|
7
7
|
|
|
8
8
|
# Import required libraries for each format
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyGamLab
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0
|
|
4
4
|
Summary: A scientific Python library with constants, unit convertors, formulas, and data analysis tools.
|
|
5
5
|
Home-page: https://github.com/APMaii/pygamlab/tree/main
|
|
6
6
|
Author: Ali Pilehvar Meibody
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
PyGamLab/Constants.py,sha256=SrKmilorNEOXB-4TTYjJGroAmh6Ric7KIPiEXQS7eZg,121229
|
|
2
2
|
PyGamLab/Converters.py,sha256=ZZxqOP4SgHjq4mUsmhwShZbcd_hxX2iLfWbJpDimra0,48060
|
|
3
|
-
PyGamLab/Data_Analysis.py,sha256=
|
|
4
|
-
PyGamLab/Functions.py,sha256=
|
|
3
|
+
PyGamLab/Data_Analysis.py,sha256=nGK4md65HFv6cEDSdgWQobd05p9ozE0-6pkHOG3fPOs,227595
|
|
4
|
+
PyGamLab/Functions.py,sha256=kbktgvBwbZfoqhdIvObCaEQuR9CK64baRs_4lI30Eqc,146200
|
|
5
5
|
PyGamLab/__init__.py,sha256=xpL6fssZvmXb4kQXmH5QC7uxoxyX9pocarl4ILVLj_4,1977
|
|
6
|
-
PyGamLab/structures/__init__.py,sha256=
|
|
6
|
+
PyGamLab/structures/__init__.py,sha256=EcQDZnfBju2W7oH2_rt75MQMFTr2-3T2hdXmD5iEDPk,408
|
|
7
7
|
PyGamLab/structures/GAM_architectures/GAM_Graphene.py,sha256=FYyTequF93Xy7jMybS9XCo5Usj_FbYeA88SM_v69WD4,15591
|
|
8
|
-
PyGamLab/structures/GAM_architectures/GAM_nano_particles.py,sha256=
|
|
8
|
+
PyGamLab/structures/GAM_architectures/GAM_nano_particles.py,sha256=wEgZP879DbjSpiiJ4s__FooU2rR4lgpXa5Z3QjBPJdQ,35677
|
|
9
9
|
PyGamLab/structures/GAM_architectures/GAM_nanotubes.py,sha256=wrTnPWNcTnI4sRyhGPbRN-2Lf6Iuuph-ZKUbBKyo9Yc,33839
|
|
10
10
|
PyGamLab/structures/GAM_architectures/GAM_phosphorene.py,sha256=hlQQVTB4kEYPtXH1aCYNHjskLgijdRW9tPNvQbNJoOQ,16470
|
|
11
11
|
PyGamLab/structures/GAM_architectures/GAM_sillicene.py,sha256=hlfsMDb58f29YbMcncV9hvL5lPR3TfAiIaNvAcvs5Go,15710
|
|
@@ -19,14 +19,14 @@ PyGamLab/structures/Primatom/__init__.py,sha256=aTyKftoHEFKj1Cb_ZMOA5pzzL8fYFaPE
|
|
|
19
19
|
PyGamLab/structures/Primatom/gam_molecule.py,sha256=yqaxB4LPUlqkcD5lcPduaRFcc5mUNlKvMVBKSLL2afo,27817
|
|
20
20
|
PyGamLab/structures/Primatom/gam_universe.py,sha256=c2asyxLTl0W0bLfuPX_Sy-iNn4A8q6VN8p8_VDrNHhQ,45341
|
|
21
21
|
PyGamLab/structures/gamvis/__init__.py,sha256=H7upc7UML_38lFUjF7fEFYYKfDkpOGsuZ1oANIM5vcM,151
|
|
22
|
-
PyGamLab/structures/gamvis/gamvis.py,sha256=
|
|
22
|
+
PyGamLab/structures/gamvis/gamvis.py,sha256=5xCi0HR6fhEqAzqPr5O1gJbvND3IMLByORoWQigXiJ4,28222
|
|
23
23
|
PyGamLab/structures/gamvis/gamvis_engine.py,sha256=zhMAwrUmAR4qNUQRVDsHeOIqlIwW82AESgZPI8bGgt0,34215
|
|
24
24
|
PyGamLab/structures/io/__init__.py,sha256=fUo58sY9CDwjb3WmfgkyvBcepjlbtUtOrWsZW-MXmrI,237
|
|
25
25
|
PyGamLab/structures/io/checker.py,sha256=mpSSPX0PoOA2E43pFMj7zpVG4kbUQDRak6ixNCWx_6A,5222
|
|
26
|
-
PyGamLab/structures/io/conversions.py,sha256=
|
|
26
|
+
PyGamLab/structures/io/conversions.py,sha256=z_bIzF5SNNNzUUYvnmR5rPsMKfODmOB2dN51RDhzHi4,13457
|
|
27
27
|
PyGamLab/structures/io/export.py,sha256=mput2AN7qGD2LlaUVffCQOllWtSVpWN-ilh7eOWg8FQ,13747
|
|
28
28
|
PyGamLab/structures/io/read.py,sha256=JD6WUZolqdRWXdYOHqaw2GXCBwp-OGDyjJaBChfRyQM,21955
|
|
29
|
-
pygamlab-1.
|
|
30
|
-
pygamlab-1.
|
|
31
|
-
pygamlab-1.
|
|
32
|
-
pygamlab-1.
|
|
29
|
+
pygamlab-1.3.0.dist-info/METADATA,sha256=9Ar6pSYexZCX1ZXxmwqJON5VGE7oq9Fg3_E2K0bWAiA,10590
|
|
30
|
+
pygamlab-1.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
31
|
+
pygamlab-1.3.0.dist-info/top_level.txt,sha256=E5IBZwx9PoAR8NyXgNAT3iUIuGvYfJlfyOKQY1sNkXU,9
|
|
32
|
+
pygamlab-1.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|