@@ -51,6 +51,34 @@ The labels provided in the `OUTCAR`, i.e. energies, forces and virials (if any),
5151
5252The ` System ` or ` LabeledSystem ` can be constructed from the following file formats with the ` format key ` in the table passed to argument ` fmt ` :
5353
54+ | Software| format | multi frames | labeled | class | format key |
55+ | ------- | :--- | :---: | :---: | :--- | :--- |
56+ | vasp | poscar | False | False | System | 'vasp/poscar' |
57+ | vasp | outcar | True | True | LabeledSystem | 'vasp/outcar' |
58+ | vasp | xml | True | True | LabeledSystem | 'vasp/xml' |
59+ | lammps | lmp | False | False | System | 'lammps/lmp' |
60+ | lammps | dump | True | False | System | 'lammps/dump' |
61+ | deepmd | raw | True | False | System | 'deepmd/raw' |
62+ | deepmd | npy | True | False | System | 'deepmd/npy' |
63+ | deepmd | raw | True | True | LabeledSystem | 'deepmd/raw' |
64+ | deepmd | npy | True | True | LabeledSystem | 'deepmd/npy' |
65+ | gaussian| log | False | True | LabeledSystem | 'gaussian/log'|
66+ | gaussian| log | True | True | LabeledSystem | 'gaussian/md' |
67+ | siesta | output | False | True | LabeledSystem | 'siesta/output'|
68+ | siesta | aimd_output | True | True | LabeledSystem | 'siesta/aimd_output' |
69+ | cp2k | output | False | True | LabeledSystem | 'cp2k/output' |
70+ | cp2k | aimd_output | True | True | LabeledSystem | 'cp2k/aimd_output' |
71+ | QE | log | False | True | LabeledSystem | 'qe/pw/scf' |
72+ | QE | log | True | False | System | 'qe/cp/traj' |
73+ | QE | log | True | True | LabeledSystem | 'qe/cp/traj' |
74+ | quip/gap| xyz| True| True| MultiSystems| 'quip/gap/xyz'|
75+ | PWmat | atom.config | False | False | System | 'pwmat/atom.config' |
76+ | PWmat | movement | True | True | LabeledSystem | 'pwmat/movement' |
77+ | PWmat | OUT.MLMD | True | True | LabeledSystem | 'pwmat/out.mlmd' |
78+ | Amber | multi | True | True | LabeledSystem | 'amber/md' |
79+ | Gromacs | gro | False | False | System | 'gromacs/gro' |
80+
81+
5482The 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.
5583
5684Use ` dpdata.MultiSystems.from_dir ` to read from a directory, ` dpdata.MultiSystems ` will walk in the directory
@@ -82,35 +110,8 @@ xyz_multi_systems.systems['B1C9'].to_deepmd_raw('./my_work_dir/B1C9_raw')
82110
83111# dump all systems
84112xyz_multi_systems.to_deepmd_raw(' ./my_deepmd_data/' )
85-
86-
87113```
88114
89- | Software| format | multi frames | labeled | class | format key |
90- | ------- | :--- | :---: | :---: | :--- | :--- |
91- | vasp | poscar | False | False | System | 'vasp/poscar' |
92- | vasp | outcar | True | True | LabeledSystem | 'vasp/outcar' |
93- | vasp | xml | True | True | LabeledSystem | 'vasp/xml' |
94- | lammps | lmp | False | False | System | 'lammps/lmp' |
95- | lammps | dump | True | False | System | 'lammps/dump' |
96- | deepmd | raw | True | False | System | 'deepmd/raw' |
97- | deepmd | npy | True | False | System | 'deepmd/npy' |
98- | deepmd | raw | True | True | LabeledSystem | 'deepmd/raw' |
99- | deepmd | npy | True | True | LabeledSystem | 'deepmd/npy' |
100- | gaussian| log | False | True | LabeledSystem | 'gaussian/log'|
101- | gaussian| log | True | True | LabeledSystem | 'gaussian/md' |
102- | siesta | output | False | True | LabeledSystem | 'siesta/output'|
103- | siesta | aimd_output | True | True | LabeledSystem | 'siesta/aimd_output' |
104- | cp2k | output | False | True | LabeledSystem | 'cp2k/output' |
105- | cp2k | aimd_output | True | True | LabeledSystem | 'cp2k/aimd_output' |
106- | QE | log | False | True | LabeledSystem | 'qe/pw/scf' |
107- | QE | log | True | False | System | 'qe/cp/traj' |
108- | QE | log | True | True | LabeledSystem | 'qe/cp/traj' |
109- | quip/gap| xyz| True| True| MultiSystems| 'quip/gap/xyz'|
110- | PWmat | atom.config | False | False | System | 'pwmat/atom.config' |
111- | PWmat | movement | True | True | LabeledSystem | 'pwmat/movement' |
112- | PWmat | OUT.MLMD | True | True | LabeledSystem | 'pwmat/out.mlmd' |
113- | Amber | multi | True | True | LabeledSystem | 'amber/md' |
114115## Access data
115116These properties stored in ` System ` and ` LabeledSystem ` can be accessed by operator ` [] ` with the key of the property supplied, for example
116117``` python
@@ -130,7 +131,6 @@ Available properties are (nframe: number of frames in the system, natoms: total
130131| 'virials' | np.ndarray | nframes x 3 x 3 | True | The virial tensor of each frame
131132
132133
133-
134134## Dump data
135135The data stored in ` System ` or ` LabeledSystem ` can be dumped in 'lammps/lmp' or 'vasp/poscar' format, for example:
136136``` python
@@ -142,7 +142,6 @@ d_outcar.to('vasp/poscar', 'POSCAR', frame_idx=-1)
142142```
143143The last frames of ` d_outcar ` will be dumped to 'POSCAR'.
144144
145-
146145The data stored in ` LabeledSystem ` can be dumped to deepmd-kit raw format, for example
147146``` python
148147d_outcar.to(' deepmd/raw' , ' dpmd_raw' )
@@ -157,13 +156,15 @@ dpdata.LabeledSystem('OUTCAR').sub_system([0,-1]).to('deepmd/raw', 'dpmd_raw')
157156```
158157by which only the first and last frames are dumped to ` dpmd_raw ` .
159158
159+
160160## replicate
161161dpdata will create a super cell of the current atom configuration.
162162``` python
163163dpdata.System(' ./POSCAR' ).replicate((1 ,2 ,3 ,) )
164164```
165165tuple(1,2,3) means don't copy atom configuration in x direction, make 2 copys in y direction, make 3 copys in z direction.
166166
167+
167168## perturb
168169By 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).
169170``` python
0 commit comments