Skip to content

Commit 185ecf0

Browse files
authored
Update README.md
1 parent ad0e99a commit 185ecf0

File tree

1 file changed

+4
-25
lines changed

1 file changed

+4
-25
lines changed

README.md

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -153,40 +153,19 @@ dpdata.LabeledSystem('OUTCAR').sub_system([0,-1]).to_deepmd_raw('dpmd_raw')
153153
```
154154
by which only the first and last frames are dumped to `dpmd_raw`.
155155

156-
# replicate
156+
## replicate
157157
dpdata will create a super cell of the current atom configuration.
158-
159158
```python
160159
dpdata.System('./POSCAR').replicate((1,2,3,) )
161160
```
162161
tuple(1,2,3) means don't copy atom configuration in x direction, make 2 copys in y direction, make 3 copys in z direction.
163162

164-
# perturb
165-
dpdata will disturb the box size and shape and change atom coordinates randomly.
163+
## perturb
164+
By the following example, each frame of the original system (`dpdata.System('./POSCAR')`) is perturbed to generate three new frames. For each frame, the cell is perturbed by 5% and the atom positions are perturbed by 0.6 Angstrom. `atom_pert_style` indicates that the perturbation to the atom positions is subject to normal distribution. Other available options to `atom_pert_style` are`uniform` (uniform in a ball), and `const` (uniform on a sphere).
166165
```python
167166
perturbed_system = dpdata.System('./POSCAR').perturb(pert_num=3,
168-
box_pert_fraction=0.05,
167+
cell_pert_fraction=0.05,
169168
atom_pert_distance=0.6,
170169
atom_pert_style='normal')
171170
print(perturbed_system.data)
172171
```
173-
174-
### `pert_num`
175-
176-
Each frame in the input system will generate `pert_num` frames.
177-
That means the command will return a system containing `frames of input system * pert_num` frames.
178-
179-
### `box_pert_fraction`
180-
A relative length that determines the length the box size change in each frame. It is just a fraction and doesn't have unit. Typlicaly, for cubic box with side length `side_length` , `side_length` will increase or decrease a random value from the intervel `[-side_length*box_pert_fraction, side_length*box_pert_fraction]`.
181-
182-
It will also change the shape of the box. That means an orthogonal box will become a non-orthogonal box after perturbing. The angle of inclination of the box is a random variable.
183-
`box_pert_fraction` is also relating to the probability distribution function of the angle.
184-
185-
### `atom_pert_distance`
186-
unit:Angstrom. Determine the distance atoms move in each frame.
187-
The mean value of the distance that atom moves is about `atom_pert_distance`.
188-
189-
### `atom_pert_style`
190-
The probability distribution function used to change atom coordinates.
191-
available options:`'uniform', 'normal', 'const'`.
192-
The direction atoms move and box deformation is random.

0 commit comments

Comments
 (0)