API Reference¶
This is the API for the Fedorov package.
Classes for 3D crystal initialization¶
This section contains three classes that allow user to initialize a 3D crystal structure with different user input.
-
class
fedorov.
SpaceGroup
(space_group_number=1)[source]¶ A class for space group symmetry operation.
This class provides method to initialize a crystal unit cell with space group and Wyckoff possition information.
Parameters: space_group_number (int) – Space group number between 1 and 230. All the space group information was obtained from Bilbao Crystallographic Server
-
get_basis_vectors
(base_positions, base_type=[], base_quaternions=None, is_complete=False, apply_orientation=False)[source]¶ Get the basis vectors for the defined crystall structure.
Parameters: - base_positions (np.ndarray) – N by 3 np array of the Wyckoff postions
- base_type (list) – a list of string for particle type name
- base_quaternions (np.ndarray) – N by 4 np array of quaternions, default None
- is_complete (bool) – bool value to indicate if the positions are complete postions in a unitcell
- apply_orientations (bool) – bool value to indicate if the space group symmetry should be applied to orientatioin
Returns: basis_vectors
Return type: np.ndarray
-
-
class
fedorov.
Prototype
(space_group_number=1, wyckoff_site='', type_by_site='')[source]¶ Crystal prototype class.
This class uses the minimal necessay information needed to fully define a crystal structures with space group number, wyckoff postions(in letter name convention) and free parameters for each relavent wyckoff postions.
Parameters: - space_group_number – space group number between 1 and 230
- wyckoff_site (str) – wyckoff site letters included in the prototype
- type_by_site (str) – type name letter for each site set in wyckoff_sites
All the space group and Wyckoff positions information was obtained from Bilbao Crystallographic Server
-
class
fedorov.
AflowPrototype
(prototype_index=0, set_type=False)[source]¶ Bases:
fedorov.fedorov.Prototype
Aflow prototype class.
This class uses the crystal prototypes in Aflow database to initialize crystal structures.
Parameters: - prototype_index (int) – prototype index [0, 589] for all 590 prototypes in AFLOW.
- set_type (bool) – allow setting different type name(in A, B, C order) for different atoms in AFLOW prototype
The list of crystal structures available in Aflow are summarized below:
-
classmethod
from_query
(pearson_symbol: str | None = None, space_group: int | None = None, prototype: str | None = None, set_type: bool = False)[source]¶ Create all AflowPrototype matching the given query.
- Args:
- pearson_symbol (str, optional): The Pearson symbol to search for,
- defaults to
None
which accepts any Pearson symbol. - space_group (int, optional): The space group to search for,
- defaults to
None
which accepts any space group. - prototype (str, optional): The chemical prototype to search for,
- defaults to
None
which accepts any prototype. - set_type (bool, optional): Set different type name (in alphabetic
- order starting with “A”) for different atoms in AFLOW prototype.
- Returns:
- lattices (list[AflowPrototype]): The list of all
- AflowPrototype’s with a given Pearson symbol.
Classes for 3D unit cell¶
-
class
fedorov.
Monoclinic
[source]¶ A class for constructing a monoclinic unitcell
This class provides method to initialize a monoclinic unitcell
Class for 2D crystal initialization¶
This section contains one class that allows user to initialize a 2D crystal structure with different user input.
-
class
fedorov.
PlaneGroup
(plane_group_number=1)[source]¶ A class for plane group symmetry operation.
This class provides method to initialize a crystal unit cell with plane group and Wyckoff possition information.
Parameters: plane_group_number (int) – Plane group number between 1 and 17. All the plane group information was obtained from Bilbao Crystallographic Server
-
get_basis_vectors
(base_positions, base_type=[], base_quaternions=None, is_complete=False, apply_orientation=False)[source]¶ Get the basis vectors for the defined crystall structure.
Parameters: - base_positions (np.ndarray) – N by 2 np array of the Wyckoff postions
- base_type (list) – a list of string for particle type name
- base_quaternions (np.ndarray) – N by 4 np array of quaternions, default None
- is_complete (bool) – bool value to indicate if the positions are complete postions in a unitcell
- apply_orientations (bool) – bool value to indicate if the space group symmetry should be applied to orientation
Returns: basis_vectors
Return type: np.ndarray
-
Classes for 2D unit cell¶
-
class
fedorov.
Oblique2D
[source]¶ A class for constructing a 2D oblique unitcell
This class provides method to initialize a 2D oblique unitcell
-
class
fedorov.
Rectangular2D
[source]¶ A class for constructing a 2D rectangular unitcell
This class provides method to initialize a 2D rectangular unitcell
-
class
fedorov.
Hexagonal2D
[source]¶ A class for constructing a 2D hexagonal unitcell
This class provides method to initialize a 2D hexagonal unitcell
Class for Point group symmetry operations¶
This section contains one class that allows user to obtain all point group symmetry operations.
-
class
fedorov.
PointGroup
(point_group_number=1)[source]¶ A class to access all point group symmetry operations.
This class provides method to access all point group symmetry operation in both rotational matrix form or quaternion form.
Parameters: point_group_number (int) – Point group number between 1 and 32. All the point group information was obtained from Bilbao Crystallographic Server