Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhu2017 committed Oct 24, 2024
1 parent 1643ed5 commit fd5d75a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion doc/Background.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <http://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-wp-list?gnum=107>`_.
at the `url <http://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-wp-list?gnum=107>`_.
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
Expand Down
6 changes: 4 additions & 2 deletions doc/Usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ pyxtal.lattice.Lattice
~~~~~~~~~~~~~~~~~~~~~~

It is possible to supply your own unit cell lattice for a random crystal,
via the `Lattice <pyxtal.lattice.html>`_ class. You can define a lattice using
via the `pyxtal.lattice.Lattice <pyxtal.lattice.html>`_ class. You can define a lattice using
either a :math: `3 \times 3` matrix, or 6
cell parameters:

Expand All @@ -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 <pyxtal.tolerance.html>`_ class.
using the `pyxtal.tolerance.Tol_matrix <pyxtal.tolerance.html>`_ class.
To do this, initialize a ``Tol_matrix`` object using one of the built-in methods.

.. code-block:: Python
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions pyxtal/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit fd5d75a

Please sign in to comment.