occpy 0.6.12__cp311-cp311-macosx_10_15_universal2.whl → 0.7.2__cp311-cp311-macosx_10_15_universal2.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.
bin/occ CHANGED
Binary file
occpy/__init__.py CHANGED
@@ -1,11 +1,20 @@
1
1
  from pathlib import Path
2
2
  import site
3
3
  import warnings
4
- from ._occpy import setup_logging, set_data_directory
5
- from ._occpy import *
4
+ from ._occpy import (
5
+ set_log_level,
6
+ set_log_file,
7
+ set_data_directory,
8
+ set_num_threads,
9
+ LogLevel,
10
+ )
11
+ from .core import Atom, Element, Molecule, Dimer
12
+ from .crystal import Crystal
13
+ from .qm import AOBasis, HartreeFock, Shell, Wavefunction
14
+ from .dft import DFT
6
15
 
7
- # Set up logging first
8
- setup_logging(0)
16
+ # Set up logging first, only log critical errors
17
+ set_log_level(LogLevel.CRITICAL)
9
18
 
10
19
  # Get site-packages directory and construct path to data
11
20
  _site_packages = Path(site.getsitepackages()[0])
@@ -18,34 +27,41 @@ if not _data_dir.exists():
18
27
  set_data_directory(str(_data_dir))
19
28
 
20
29
  __all__ = [
21
- "AOBasis",
22
- "AsymmetricUnit",
23
30
  "Atom",
24
- "BeckeGridSettings",
31
+ "AOBasis",
25
32
  "calculate_crystal_growth_energies",
33
+ "core",
34
+ "crystal",
26
35
  "Crystal",
27
- "CrystalAtomRegion",
28
- "CrystalDimers",
29
- "CrystalGrowthConfig",
30
- "CGDimer",
31
- "CGEnergyTotal",
32
- "CGResult",
36
+ "dft",
33
37
  "DFT",
34
38
  "Dimer",
35
- "DimerSolventTerm",
36
39
  "Element",
37
40
  "HartreeFock",
38
- "HF",
39
- "HKL",
40
- "KS",
41
- "LatticeConvergenceSettings",
42
- "MolecularOrbitals",
41
+ "LogLevel",
43
42
  "Molecule",
43
+ "qm",
44
44
  "set_data_directory",
45
45
  "set_num_threads",
46
- "setup_logging",
46
+ "set_log_file",
47
+ "set_log_level",
47
48
  "Shell",
48
- "SymmetryRelatedDimer",
49
- "UnitCell",
50
49
  "Wavefunction",
51
50
  ]
51
+
52
+
53
+ def run_occ_executable():
54
+ import subprocess
55
+ import sys
56
+ import os
57
+ from pathlib import Path
58
+
59
+ env = os.environ.copy()
60
+ site_packages = Path(site.getsitepackages()[0])
61
+ data_dir = site_packages / "share" / "occ"
62
+ occ_path = site_packages / "bin" / "occ"
63
+
64
+ if data_dir.exists():
65
+ env["OCC_DATA_PATH"] = str(data_dir)
66
+
67
+ subprocess.run([str(occ_path)] + sys.argv[1:], env=env)
Binary file
occpy/core/__init__.py ADDED
@@ -0,0 +1 @@
1
+ from .._occpy.core import *
@@ -0,0 +1 @@
1
+ from .._occpy.crystal import *
occpy/dft/__init__.py ADDED
@@ -0,0 +1 @@
1
+ from .._occpy.dft import *
@@ -0,0 +1 @@
1
+ from .._occpy.isosurface import *
occpy/qm/__init__.py ADDED
@@ -0,0 +1 @@
1
+ from .._occpy.qm import *
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: occpy
3
- Version: 0.6.12
3
+ Version: 0.7.2
4
4
  Summary: A library for quantum chemistry
5
5
  Author-Email: Peter Spackman <peterspackman@fastmail.com>
6
6
  Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
@@ -93,32 +93,33 @@ OCC provides comprehensive functionality for ground-state single-point calculati
93
93
  ## Python API Examples
94
94
 
95
95
  ```python
96
- import occ
96
+ import occpy
97
+ from occpy import Crystal, Molecule, AOBasis, HartreeFock, DFT
98
+ from occpy.qm import SpinorbitalKind
97
99
 
98
100
  # Set up basic configuration
99
- occ.setup_logging(1) # Configure logging level
100
- occ.set_data_directory("/path/to/basis/sets") # Optional: Set basis set path
101
+ occpy.set_log_level(occpy.LogLevel.WARN) # Configure logging level
102
+ # occpy.set_data_directory("/path/to/basis/sets") # Optional: Set basis set path
101
103
 
102
104
  # Load molecule from XYZ file
103
- mol = occ.Molecule.from_xyz_file("h2o.xyz")
105
+ mol = Molecule.from_xyz_file("h2o.xyz")
104
106
 
105
- # Basic Hartree-Fock calculation
106
- basis = occ.AOBasis.load("6-31G", mol.atoms())
107
- hf = occ.HartreeFock(basis)
108
- scf = hf.scf(unrestricted=False) # Restricted calculation
109
- scf.set_charge_multiplicity(0, 1) # Neutral singlet
107
+ # Basic Restricted Hartree-Fock calculation
108
+ basis = AOBasis.load(mol.atoms(), "6-31G")
109
+ hf = HartreeFock(basis)
110
+ scf = hf.scf()
110
111
  energy = scf.run()
111
112
  wfn = scf.wavefunction()
112
113
 
113
114
  # DFT calculation
114
- dft = occ.DFT("B3LYP", basis)
115
- ks = dft.scf(unrestricted=False)
115
+ dft = DFT("B3LYP", basis)
116
+ ks = dft.scf(SpinorbitalKind.Unrestricted)
116
117
  ks.set_charge_multiplicity(0, 1)
117
118
  energy = ks.run()
118
119
 
119
120
  # Crystal structure analysis
120
- crystal = occ.Crystal.from_cif_file("structure.cif")
121
- dimers = crystal.symmetry_unique_dimers(radius=10.0) # Get unique dimers within 10 Å
121
+ crystal = Crystal.from_cif_file("structure.cif")
122
+ dimers = crystal.symmetry_unique_dimers(10.0) # Get unique dimers within 10 Å
122
123
  ```
123
124
 
124
125
  For more examples and detailed API documentation, please refer to the [documentation](docs_url_here).
@@ -1,10 +1,16 @@
1
- occpy/_occpy.cpython-311-darwin.so,sha256=bfKJzlZUGrDp0Xpc-aVWw-KyJQsjN-wNX4fOWjjvHVA,49614592
2
- occpy/__init__.py,sha256=wwCFCKiOG5_LxG632l9TXD2nEu6dh8UHIoctRgDarTs,1120
3
- bin/occ,sha256=xu_iSCNPn66CEfVVtUMrbh2ktdaGxCXY2KJAG8L5Ydg,57091584
4
- occpy-0.6.12.dist-info/RECORD,,
5
- occpy-0.6.12.dist-info/WHEEL,sha256=ETXkQbc10mAhmULNsR-VmFqA99mOERkKdHuGT_e-NZM,120
6
- occpy-0.6.12.dist-info/METADATA,sha256=4wF45_nAxWGdZ4DtJN6j52spUjGgdKDI-ZZSyTlMGi0,6706
7
- occpy-0.6.12.dist-info/licenses/LICENSE.txt,sha256=5fvmauGmRic38fyZZuc3YBBPEmgbYKVcRuCb1YLN7UU,781
1
+ occpy-0.7.2.dist-info/RECORD,,
2
+ occpy-0.7.2.dist-info/WHEEL,sha256=ETXkQbc10mAhmULNsR-VmFqA99mOERkKdHuGT_e-NZM,120
3
+ occpy-0.7.2.dist-info/entry_points.txt,sha256=A4GiWZiBEsMWu1jDPAQiDe4HxoDYPNK4hEduZYG1oKg,52
4
+ occpy-0.7.2.dist-info/METADATA,sha256=9SNFT7APpw9f352F0wkwCsbG60fR_jYlwRCNcgB--hM,6728
5
+ occpy-0.7.2.dist-info/licenses/LICENSE.txt,sha256=5fvmauGmRic38fyZZuc3YBBPEmgbYKVcRuCb1YLN7UU,781
6
+ occpy/_occpy.cpython-311-darwin.so,sha256=V47oivJqTGpi9eN76UVUM3qTwKOlltGu2dKJhZIFo5I,51706008
7
+ occpy/__init__.py,sha256=gLiJYqL4iZeWTfbbY_tzVG_hHDU8hOQtfNl87g6dH-I,1531
8
+ occpy/core/__init__.py,sha256=JC4Ik0SIFFAgv0IL7SWJC6yBIK7aXGI67fp9E_DKhjU,28
9
+ occpy/dft/__init__.py,sha256=ow8XTJl0CHkxmc_lt4T7S6ngp1p4WUgjILe5n2zCtTA,27
10
+ occpy/crystal/__init__.py,sha256=OnXmaAaqCdT-qUsdCaxzTPsAAkMUgtby8HBSVeGHeNQ,31
11
+ occpy/isosurface/__init__.py,sha256=0xyQP668dbQd9je5-BxHSIOkjAZwSbmVMO96GX6J6H8,34
12
+ occpy/qm/__init__.py,sha256=nE3qnqGKWl5VxrUKg2GTC4mOSKMSZTFDfbeV073KvIc,26
13
+ bin/occ,sha256=MF4bF0AsrHZjEDpXVscSFeV9cMT6SD6upOBbOLPJHes,57631680
8
14
  share/occ/solvent/dielectric_constants.json,sha256=GMRldNjqknxVm9ROCDvDrfWhIc9FdIIjGhnAxQwT26c,49229
9
15
  share/occ/solvent/dielectrics.json,sha256=E8otdtPhjmZDSOoXnSo2gsM8zV5KVXpt3C8aZ3qyxFM,4854
10
16
  share/occ/solvent/smd.json,sha256=GMRldNjqknxVm9ROCDvDrfWhIc9FdIIjGhnAxQwT26c,49229
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ occpy = occpy:run_occ_executable
3
+
File without changes