Skip to content

Commit

Permalink
Updated docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
lauri-codes committed Jul 30, 2024
1 parent 16b0b7b commit af30a4c
Show file tree
Hide file tree
Showing 7 changed files with 1,603 additions and 695 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: test

on:
push:
branches: [ "main", "2.1.0", "optimization"]
branches: [ "main"]
pull_request:
branches: [ "main"]

Expand Down
65 changes: 13 additions & 52 deletions docs/docs/reference/geometry.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,42 +220,6 @@ is within the half-closed interval [0, 1)
By wrapping values near 1 to 0 we will have a consistent way of
presenting systems.

## get\_displacement\_tensor\_old

```python
def get_displacement_tensor_old(pos1,
pos2,
cell=None,
pbc=None,
mic=False,
cutoff=None,
return_factors=False,
return_distances=False)
```

Given an array of positions, calculates the 3D displacement tensor
between the positions.

The displacement tensor is a matrix where the entry A[i, j, :] is the
vector pos1[i] - pos2[j], i.e. the vector from pos2 to pos1

**Arguments**:

- `pos1(np.ndarray)` - 2D array of positions
- `pos2(np.ndarray)` - 2D array of positions
- `cell(np.ndarray)` - Cell for taking into account the periodicity
pbc(boolean or a list of booleans): Periodicity of the axes
- `mic(boolean)` - Whether to return the displacement to the nearest
periodic copy


**Returns**:

- `np.ndarray` - 3D displacement tensor
(optional) np.ndarray: The indices of the periodic copies in which the
minimum image was found
(optional) np.ndarray: The lengths of the displacement vectors

## find\_mic

```python
Expand Down Expand Up @@ -398,7 +362,7 @@ Also takes periodic boundaries into account.
## get\_matches

```python
def get_matches(system, positions, numbers, tolerances, mic=True)
def get_matches(system, cell_list, positions, numbers, tolerance)
```

Given a system and a list of cartesian positions and atomic numbers,
Expand All @@ -408,10 +372,10 @@ positions with some tolerance.
**Arguments**:

- `system(ASE.Atoms)` - System where to search the positions
- `cell_list(CellList)` - The cell list for an appropriately extended version
of the system.
- `positions(np.ndarray)` - Positions to match in the system.
- `tolerances(np.ndarray)` - Maximum allowed distance for each vector that
is allowed for a match in position.
- `mic(boolean)` - Whether to find the minimum image copy.
- `tolerance(float)` - Maximum allowed distance for matching.


**Returns**:
Expand All @@ -422,10 +386,10 @@ positions with some tolerance.
- `np.ndarray` - for each searched position, an integer array representing
the number of the periodic copy where the match was found.

## get\_matches\_new
## get\_matches\_simple

```python
def get_matches_new(system, cell_list, positions, numbers, tolerances)
def get_matches_simple(system, cell_list, positions, numbers, tolerance)
```

Given a system and a list of cartesian positions and atomic numbers,
Expand All @@ -438,29 +402,26 @@ positions with some tolerance.
- `cell_list(CellList)` - The cell list for an appropriately extended version
of the system.
- `positions(np.ndarray)` - Positions to match in the system.
- `tolerances(np.ndarray)` - Maximum allowed distance for each vector that
is allowed for a match in position.

- `tolerance(float)` - Maximum allowed distance for matching.

**Returns**:

- `np.ndarray` - indices of matched atoms
- `list` - list of substitutions
- `list` - list of vacancies
- `np.ndarray` - for each searched position, an integer array representing
the number of the periodic copy where the match was found.
- `list` - list of matched atoms or None is nothing was matched.

## get\_cell\_list

```python
def get_cell_list(positions, indices, factors, cutoff=0)
def get_cell_list(positions, cell, pbc, extension, cutoff)
```

Given a system and a cutoff value, returns a cell list object.

**Arguments**:

- `system(ASE.Atoms)` - System to extend
- `positions(np.ndarray)` - Cartesian positions
- `cell(np.ndarray)` - Cell as 3x3 array
- `pbc(np.ndarray)` - Periodic boundary conditions as array of three booleans
- `extension(float)` - How much the system should be extended for the search.
- `cutoff(float)` - Radial cutoff


Expand Down
14 changes: 3 additions & 11 deletions docs/docs/reference/sbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,6 @@ periodically repeating motifs, and as such it is not suitable for e.g.
finding molecules. Any atoms that do not have enough periodic repetitions
will be returned as isolated clusters.

## \_\_init\_\_

```python
def __init__(seed=7)
```

**Arguments**:

- `seed(int)` - The seed that is used for random number generation.

## get\_clusters

```python
Expand All @@ -33,7 +23,8 @@ def get_clusters(system,
merge_radius=1,
bond_threshold=0.65,
overlap_threshold=-0.1,
radii="covalent")
radii="covalent",
seed=7)
```

Used to detect and return structurally separate clusters within the
Expand Down Expand Up @@ -67,6 +58,7 @@ given system.
- vdw: van Der Waals radii from DOI:10.1039/C3DT50599E
- vdw_covalent: preferably van Der Waals radii, covalent if vdw
not defined.
- `seed(int)` - The seed that is used for random number generation.


**Returns**:
Expand Down
10 changes: 5 additions & 5 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "^3.1.1",
"@docusaurus/plugin-ideal-image": "^3.1.1",
"@docusaurus/preset-classic": "^3.1.1",
"@docusaurus/core": "^3.4.0",
"@docusaurus/plugin-ideal-image": "^3.4.0",
"@docusaurus/preset-classic": "^3.4.0",
"@mdx-js/react": "^3.0.0",
"clsx": "^1.2.1",
"hast-util-is-element": "^1.1.0",
Expand All @@ -28,8 +28,8 @@
"remark-math": "^6.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.1.1",
"@docusaurus/types": "^3.1.1"
"@docusaurus/module-type-aliases": "^3.4.0",
"@docusaurus/types": "^3.4.0"
},
"browserslist": {
"production": [
Expand Down
1 change: 1 addition & 0 deletions docs/pydoc-markdown.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
loaders:
- type: python
search_path: [../]
processors:
- type: filter
skip_empty_modules: true
Expand Down
Loading

0 comments on commit af30a4c

Please sign in to comment.