From fd5d75a92878745213fc0db5f7753c062ec39351 Mon Sep 17 00:00:00 2001 From: qzhu2017 Date: Thu, 24 Oct 2024 13:34:06 -0400 Subject: [PATCH] update doc --- doc/Background.rst | 2 +- doc/Usage.rst | 6 ++++-- doc/conf.py | 2 +- pyxtal/util.py | 12 ++++++------ 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/doc/Background.rst b/doc/Background.rst index 8b2b91b9..6c9ef997 100644 --- a/doc/Background.rst +++ b/doc/Background.rst @@ -701,7 +701,7 @@ position, since it has the largest multiplicity and last letter alphabetically. Note that for space groups with non-simple lattices (those which begin with a letter other than 'P'), the Wyckoff positions also contain fractional translations. Take for example the space group ``I4mm (#107)``. The Bilbao entry can be found -`here `_. +at the `url `_. Each listed Wyckoff position coordinate has a copy which is translated by ``(0.5,0.5,0.5)``. It is inconvenient to list each of these translated copies for every Wyckoff position, so instead a note is placed at the top. This is why diff --git a/doc/Usage.rst b/doc/Usage.rst index 0cb90ecc..68d53ca9 100644 --- a/doc/Usage.rst +++ b/doc/Usage.rst @@ -260,7 +260,7 @@ pyxtal.lattice.Lattice ~~~~~~~~~~~~~~~~~~~~~~ It is possible to supply your own unit cell lattice for a random crystal, -via the `Lattice `_ class. You can define a lattice using +via the `pyxtal.lattice.Lattice `_ class. You can define a lattice using either a :math: `3 \times 3` matrix, or 6 cell parameters: @@ -284,7 +284,7 @@ pyxtal.tolerance.Tol_matrix When generating random crystals, PyXtal performs inter-atomic distances checks to make sure the atoms are not too close together. By default, the covalent radius is used as a basis. However, the user may also define their own criteria -using the `Tol_matrix `_ class. +using the `pyxtal.tolerance.Tol_matrix `_ class. To do this, initialize a ``Tol_matrix`` object using one of the built-in methods. .. code-block:: Python @@ -365,10 +365,12 @@ Dimension: 3 Composition: C4 Group: P 63/m m c (194) 2.4600, 2.4600, 6.7000, 90.0000, 90.0000, 120.0000, hexagonal + Wyckoff sites: C @ [ 0.3333 0.6667 0.2500], WP [2c] Site [-622m2] C @ [ 0.0000 0.0000 0.2500], WP [2b] Site [-622m2] + Note that this function so far only supports `graphite`, `diamond`, `a-cristobalite`, `b-cristobalite`, `a-quartz`, `b-quartz`, `rocksalt`, `B1`, `B2`. A more general approach is to call the ``build`` function, diff --git a/doc/conf.py b/doc/conf.py index b0b5831b..5cbd42e3 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -17,7 +17,7 @@ sys.path.insert(0, os.path.abspath("../")) # List of modules to mock -MOCK_MODULES = ['torchani', 'lammps', 'pyshtools'] +MOCK_MODULES = ['torchani', 'lammps', 'pyshtools', 'mace'] class Mock(MagicMock): @classmethod diff --git a/pyxtal/util.py b/pyxtal/util.py index 02dc89ec..4718e6ae 100644 --- a/pyxtal/util.py +++ b/pyxtal/util.py @@ -669,14 +669,14 @@ def split_list_by_ratio(nums, ratio): satisfies a given ratio and returns all possible ways of combinations tracking the indices of the numbers. - Parameters: - nums (list of int): The list of integers to split. - ratio (tuple of int): A tuple representing the desired ratio (e.g., (1, 1) for 1:1 ratio). + Args: + nums (list of int): The list of integers to split. + ratio (tuple of int): A tuple of the desired ratio (e.g., (1, 1) for 1:1 ratio). Returns: - list of tuple: A list of tuples where each tuple contains two lists of indices. - Each pair of lists represents one possible way to split the numbers - to satisfy the given ratio. + list of tuple: A list of tuples where each contains two lists of indices. + Each pair of lists represents one possible way to split the + numbers to satisfy the given ratio. """ def find_splits(i, sum1, sum2, group1, group2):