Skip to content

Commit 2964c8f

Browse files
committed
update doc for MultiSystems.from_dir
1 parent c5f412f commit 2964c8f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,21 @@ The labels provided in the `OUTCAR`, i.e. energies, forces and virials (if any),
5151

5252
The `System` or `LabeledSystem` can be constructed from the following file formats with the `format key` in the table passed to argument `fmt`:
5353

54-
For `quip/gap xyz` files, single .xyz file may include many different configurations with different atom numbers and atom type.
54+
The Class `dpdata.MultiSystems` can read data from a dir which may contains many files of different systems, or from single xyz file which contains different systems.
5555

56-
The Class `dpdata.MultiSystems` can read data this kind of file.
57-
Now Class dpdata.MultiSystems Only support quip/gap xyz format file.
56+
Use `dpdata.MultiSystems.from_dir` to read from a directory, `dpdata.MultiSystems` will walk in the directory
57+
Recursively and find all file with specific file_name. Supports all the file formats that `dpdata.LabeledSystem` supports.
58+
59+
Use `dpdata.MultiSystems.from_file` to read from single file. Now only support quip/gap/xyz format file.
60+
61+
For example, for `quip/gap xyz` files, single .xyz file may contain many different configurations with different atom numbers and atom type.
5862

5963
The following commands relating to `Class dpdata.MultiSystems` may be useful.
6064
```python
6165
# load data
6266

63-
xyz_multi_systems = dpdata.MultiSystems.from_file('tests/xyz/xyz_unittest.xyz','quip/gap/xyz')
67+
xyz_multi_systems = dpdata.MultiSystems.from_file(file_name='tests/xyz/xyz_unittest.xyz',fmt='quip/gap/xyz')
68+
vasp_multi_systems = dpdata.MultiSystems.from_dir(dir_name='./mgal_outcar', file_name='OUTCAR', fmt='vasp/outcar')
6469

6570
# print the multi_system infomation
6671
print(xyz_multi_systems)

0 commit comments

Comments
 (0)