Skip to content

Commit

Permalink
Merge pull request #39 from easyScience/pre-release
Browse files Browse the repository at this point in the history
Release v0.3.0
  • Loading branch information
wardsimon authored Feb 28, 2023
2 parents d55a6da + 14e883a commit 8f1733b
Show file tree
Hide file tree
Showing 32 changed files with 123 additions and 91 deletions.
11 changes: 7 additions & 4 deletions easyCrystallography/Components/AtomicDisplacement.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>


from __future__ import annotations

Expand Down Expand Up @@ -212,8 +212,11 @@ def __init__(self, adp_type: Optional[Union[Descriptor, str]] = None, interface:
adp_class_name = adp_type.raw_value
if adp_class_name in _AVAILABLE_ISO_TYPES.keys():
adp_class = _AVAILABLE_ISO_TYPES[adp_class_name]
# enable passing ADP parameters to constructor
if "adp_class" in kwargs.keys():
_ = kwargs.pop("adp_class")
m = getattr(kwargs["adp_class"], adp_class_name)
kwargs[adp_class_name] = m
_ = kwargs.pop("adp_class")
adp = adp_class(**kwargs, interface=interface)
else:
raise AttributeError(f"{adp_class_name} is not a valid adp type")
Expand Down
6 changes: 3 additions & 3 deletions easyCrystallography/Components/Displacement.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>


__author__ = 'github.com/wardsimon'
__version__ = '0.1.0'
6 changes: 3 additions & 3 deletions easyCrystallography/Components/Lattice.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>

from __future__ import annotations

Expand Down Expand Up @@ -866,7 +866,7 @@ def enforce_sym(self):
crys_system = self.spacegroup.crystal_system
self.clear_sym()
trig_test = crys_system == "trigonal" and (
self.spacegroup.setting.endswith("H") or
self.spacegroup.setting_str.endswith("H") or
self.spacegroup.int_number in [143, 144, 145, 147, 149, 150, 151, 152,
153, 154, 156, 157, 158, 159, 162, 163,
164, 165])
Expand Down
6 changes: 3 additions & 3 deletions easyCrystallography/Components/Site.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>

from __future__ import annotations

__author__ = 'github.com/wardsimon'
Expand Down
6 changes: 3 additions & 3 deletions easyCrystallography/Components/SpaceGroup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>

from __future__ import annotations

__author__ = "github.com/wardsimon"
Expand Down
6 changes: 3 additions & 3 deletions easyCrystallography/Components/Specie.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>


__author__ = "github.com/wardsimon"
__version__ = "0.1.0"
Expand Down
22 changes: 18 additions & 4 deletions easyCrystallography/Components/Susceptibility.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import annotations
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>


__author__ = 'github.com/wardsimon'
__version__ = '0.1.0'
Expand Down Expand Up @@ -79,6 +79,7 @@ def __init__(self,
chi_22: Optional[Union[Parameter, float]] = None,
chi_23: Optional[Union[Parameter, float]] = None,
chi_33: Optional[Union[Parameter, float]] = None,
msp_values: Optional[Type[MSPBase]] = None,
interface=None):

super(Cani, self).__init__('Cani',
Expand All @@ -101,16 +102,27 @@ def __init__(self,
self.chi_23 = chi_23
if chi_33 is not None:
self.chi_33 = chi_33
if msp_values is not None:
self.chi_11 = msp_values.chi_11
self.chi_12 = msp_values.chi_12
self.chi_13 = msp_values.chi_13
self.chi_22 = msp_values.chi_22
self.chi_23 = msp_values.chi_23
self.chi_33 = msp_values.chi_33
self.interface = interface

class Ciso(MSPBase):
chi: ClassVar[Parameter]

def __init__(self, chi: Optional[Union[Parameter, float]] = None, interface: Optional[iF] = None):
def __init__(self, chi: Optional[Union[Parameter, float]] = None,
msp_values: Optional[Type[MSPBase]] = None,
interface: Optional[iF] = None):
super(Ciso, self).__init__('Ciso',
chi=Parameter('chi', **_ANIO_DETAILS['Ciso']))
if chi is not None:
self.chi = chi
if msp_values is not None:
self.chi = msp_values.chi
self.interface = interface

_AVAILABLE_ISO_TYPES = {
Expand All @@ -131,6 +143,8 @@ def __init__(self, msp_type: Union[Descriptor, str], interface: Optional = None,
if msp_class_name in _AVAILABLE_ISO_TYPES.keys():
msp_class = _AVAILABLE_ISO_TYPES[msp_class_name]
if "msp_class" in kwargs:
# enable passing chi values directly to constructor
kwargs['msp_values'] = kwargs['msp_class']
_ = kwargs.pop("msp_class")
msp = msp_class(**kwargs, interface=interface)
else:
Expand Down
6 changes: 3 additions & 3 deletions easyCrystallography/Components/Twin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>


__author__ = 'github.com/wardsimon'
__version__ = '0.1.0'
Expand Down
6 changes: 3 additions & 3 deletions easyCrystallography/Components/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>


__author__ = 'github.com/wardsimon'
__version__ = '0.1.0'
29 changes: 0 additions & 29 deletions easyCrystallography/Components/magnetism.py

This file was deleted.

6 changes: 3 additions & 3 deletions easyCrystallography/Elements/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>


__author__ = 'github.com/wardsimon'
__version__ = '0.1.0'
6 changes: 3 additions & 3 deletions easyCrystallography/Elements/periodic_table.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>


__author__ = 'github.com/wardsimon'
__version__ = '0.1.0'
Expand Down
8 changes: 4 additions & 4 deletions easyCrystallography/Structures/Phase.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import annotations

# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>

from __future__ import annotations

__author__ = "github.com/wardsimon"
__version__ = "0.1.0"
Expand Down
6 changes: 3 additions & 3 deletions easyCrystallography/Structures/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>


__author__ = 'github.com/wardsimon'
__version__ = '0.1.0'
6 changes: 3 additions & 3 deletions easyCrystallography/Symmetry/Bonding.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>


__author__ = 'github.com/wardsimon'
__version__ = '0.1.0'
Expand Down
8 changes: 4 additions & 4 deletions easyCrystallography/Symmetry/SymOp.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
__status__ = "Production"
__date__ = "Sep 23, 2011"

# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
from typing import Union, List, Tuple
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>

from typing import Union, List, Tuple, Any

"""
This module provides classes that operate on points or vectors in 3D space.
Expand Down
6 changes: 3 additions & 3 deletions easyCrystallography/Symmetry/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>


__author__ = 'github.com/wardsimon'
__version__ = '0.1.0'
6 changes: 3 additions & 3 deletions easyCrystallography/Symmetry/groups.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# coding: utf-8
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>


"""
Defines SymmetryGroup parent class and PointGroup and SpaceGroup classes.
Expand Down
6 changes: 3 additions & 3 deletions easyCrystallography/Symmetry/tools.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>


__author__ = 'github.com/wardsimon'
__version__ = '0.1.0'
Expand Down
6 changes: 3 additions & 3 deletions easyCrystallography/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-FileCopyrightText: 2022 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>
#
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>


__author__ = 'github.com/wardsimon'
__version__ = '0.1.0'
4 changes: 4 additions & 0 deletions easyCrystallography/io/cif/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
__version__ = '0.0.1'


# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>

from .lattice import Lattice
from .spacegroup import SpaceGroup
from .atoms import Atoms
4 changes: 4 additions & 0 deletions easyCrystallography/io/cif/atoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
__author__ = 'github.com/wardsimon'
__version__ = '0.0.1'

# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>

from typing import List, NoReturn, TYPE_CHECKING, ClassVar, Tuple, Dict

from .template import CIF_Template, gemmi
Expand Down
4 changes: 4 additions & 0 deletions easyCrystallography/io/cif/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
__author__ = 'github.com/wardsimon'
__version__ = '0.0.1'

# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>

from typing import List, NoReturn, TYPE_CHECKING, ClassVar, Tuple

from .template import CIF_Template, gemmi
Expand Down
4 changes: 4 additions & 0 deletions easyCrystallography/io/cif/lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
__author__ = 'github.com/wardsimon'
__version__ = '0.0.1'

# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>

from typing import List, NoReturn, TYPE_CHECKING, ClassVar, Tuple

from .template import CIF_Template, gemmi
Expand Down
4 changes: 4 additions & 0 deletions easyCrystallography/io/cif/spacegroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
__author__ = 'github.com/wardsimon'
__version__ = '0.0.1'

# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>

from typing import List, NoReturn, TYPE_CHECKING, ClassVar, Tuple

from .template import CIF_Template, gemmi
Expand Down
4 changes: 4 additions & 0 deletions easyCrystallography/io/cif/structures.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>

# from __future__ import annotations
#
# __author__ = 'github.com/wardsimon'
Expand Down
4 changes: 4 additions & 0 deletions easyCrystallography/io/cif/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
__author__ = 'github.com/wardsimon'
__version__ = '0.0.1'

# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>

import textwrap
from abc import abstractmethod
from easyCore import np
Expand Down
4 changes: 4 additions & 0 deletions easyCrystallography/io/cif_parser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2023 easyCrystallography contributors <crystallography@easyscience.software>
# SPDX-License-Identifier: BSD-3-Clause
# © 2022-2023 Contributors to the easyCore project <https://github.com/easyScience/easyCrystallography>

__author__ = 'github.com/wardsimon'
__version__ = '0.0.1'

Expand Down
Loading

0 comments on commit 8f1733b

Please sign in to comment.