PyGamLab 1.2.5__tar.gz → 1.3.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 (38) hide show
  1. {pygamlab-1.2.5 → pygamlab-1.3.0}/PKG-INFO +1 -1
  2. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/Data_Analysis.py +66 -3
  3. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/Functions.py +4 -4
  4. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/GAM_architectures/GAM_nano_particles.py +51 -1
  5. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/gamvis/gamvis.py +1 -1
  6. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/io/conversions.py +1 -1
  7. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab.egg-info/PKG-INFO +1 -1
  8. {pygamlab-1.2.5 → pygamlab-1.3.0}/pyproject.toml +1 -1
  9. {pygamlab-1.2.5 → pygamlab-1.3.0}/setup.py +1 -1
  10. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/Constants.py +0 -0
  11. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/Converters.py +0 -0
  12. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/__init__.py +0 -0
  13. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/GAM_architectures/GAM_Graphene.py +0 -0
  14. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/GAM_architectures/GAM_nanotubes.py +0 -0
  15. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/GAM_architectures/GAM_phosphorene.py +0 -0
  16. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/GAM_architectures/GAM_sillicene.py +0 -0
  17. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/GAM_architectures/__init__.py +0 -0
  18. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/Generators/__init__.py +0 -0
  19. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/Generators/auto_bulk.py +0 -0
  20. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/Generators/one_d.py +0 -0
  21. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/Generators/two_d.py +0 -0
  22. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/Generators/zero_d.py +0 -0
  23. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/Primatom/__init__.py +0 -0
  24. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/Primatom/gam_molecule.py +0 -0
  25. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/Primatom/gam_universe.py +0 -0
  26. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/__init__.py +0 -0
  27. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/gamvis/__init__.py +0 -0
  28. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/gamvis/gamvis_engine.py +0 -0
  29. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/io/__init__.py +0 -0
  30. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/io/checker.py +0 -0
  31. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/io/export.py +0 -0
  32. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab/structures/io/read.py +0 -0
  33. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab.egg-info/SOURCES.txt +0 -0
  34. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab.egg-info/dependency_links.txt +0 -0
  35. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab.egg-info/requires.txt +0 -0
  36. {pygamlab-1.2.5 → pygamlab-1.3.0}/PyGamLab.egg-info/top_level.txt +0 -0
  37. {pygamlab-1.2.5 → pygamlab-1.3.0}/README.md +0 -0
  38. {pygamlab-1.2.5 → pygamlab-1.3.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: PyGamLab
3
- Version: 1.2.5
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
@@ -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 = element_lines[el]
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]/atomic_weights[el] for el in elements}
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
- ef Find_MaxVerticalVelocity(df):
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.
@@ -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 Gauss_l=Law(electric_field, surface_area, electric_flux):
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."""
@@ -771,7 +771,7 @@ def ase_visualizer(atoms: List["GAM_Atom"],
771
771
  """ MAIN VISUALIZATION FUNCTION """
772
772
  #=============================================
773
773
 
774
- def molecular_visualizer(atoms: List["GAM_Atom"],
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 .Checker import is_ase, is_gam, is_pymatgen, is_mdanalysis, is_openbabel , is_rdkit
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.2.5
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
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "PyGamLab"
7
- version = "1.2.5"
7
+ version = "1.3.0"
8
8
  description = "A scientific Python library with constants, unit convertors, formulas, and data analysis tools."
9
9
  authors = [
10
10
  { name="Ali Pilehvar Meibody", email="alipilehvar1999@Gmail.com" }
@@ -5,7 +5,7 @@ from setuptools import setup, find_packages
5
5
 
6
6
  setup(
7
7
  name="PyGamLab",
8
- version="1.2.5",
8
+ version="1.3.0",
9
9
  author="Ali Pilehvar Meibody",
10
10
  author_email="alipilehvar1999@gmail.com",
11
11
  description="A scientific Python library with constants, unit convertors, formulas, and data analysis tools.",
File without changes
File without changes
File without changes
File without changes