Skip to content

Commit

Permalink
General: Added missing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Somerandomguy10111 committed Jun 22, 2024
1 parent c88bf49 commit 26adad3
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CrystalStructure/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .crystal import *
from .atomic_constants import *
1 change: 1 addition & 0 deletions CrystalStructure/atomic_constants/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .atomic_constants import ElementSymbol, AtomicConstants
3 changes: 3 additions & 0 deletions CrystalStructure/crystal/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .crystal import CrystalStructure, CrystalSystem
from .base import CrystalBase, AtomicSite
from .lattice import Lengths, Angles
File renamed without changes.
7 changes: 3 additions & 4 deletions CrystalStructure/base.py → CrystalStructure/crystal/base.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
from __future__ import annotations

import math
import json
from typing import Optional

from holytools.abstract import Serializable

import math

from CrystalStructure.atomic_constants.atomic_constants import ElementSymbol, AtomicConstants
from CrystalStructure.atomic_site import AtomicSite
from CrystalStructure.atomic_constants import ElementSymbol, AtomicConstants
from .atomic_site import AtomicSite


# ---------------------------------------------------------
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import os

from CrystalStructure.base import CrystalBase

from CrystalStructure.crystal import CrystalStructure
from .base import CrystalBase

cif1_fpath = os.path.join(os.path.dirname(__file__), 'cifs', "test1.cif")
cif2_fpath = os.path.join(os.path.dirname(__file__), 'cifs', 'test2.cif')

# ---------------------------------------------------------

class LabelExamples:

class CrystalExamples:
@staticmethod
def get_base(mute : bool = True) -> CrystalBase:
crystal_stucture = LabelExamples.get_crystal(mute=mute)
crystal_stucture = CrystalExamples.get_crystal(mute=mute)
return crystal_stucture.base

@staticmethod
def get_crystal(mute : bool = False):
cif_content = LabelExamples.get_cif_content()
cif_content = CrystalExamples.get_cif_content()
crystal_structure = CrystalStructure.from_cif(cif_content=cif_content)
if not mute:
print(f'--> Cif content:\n {open(cif1_fpath).read()}')
Expand Down
File renamed without changes.

0 comments on commit 26adad3

Please sign in to comment.