-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A more efficient way of reading MD trajectory #367
Comments
This way of loading trajectory should replace the implementation in https://github.com/deepmodeling/dpgen2/blob/2011090d12ba26a1eb3849634883f9ae0b62cc9d/dpgen2/exploration/selector/conf_selector_frame.py#L132-L138 The problem is how. Shall we provide this highly efficient way of reading frames from trajectories to |
We should add to dpdata, so others packages which use dpdata will also be benefited. |
Enhance this method: Lines 139 to 158 in e8a2fbe
|
In the workflow, we do not need to read every frame of trajectory, but only what we want. So, we should firstly make the following dict to map the frame to the trajectory:
Then, reading each trajectory:
For a LAMMPS trajectory or other raw text files, the
read
should bewhere
nlines
is the number of lines in each block, which should be determined in the very beginning. Usually, every frame has the same number of lines.process_block
method should convert a LAMMPS frame to dpdata.The text was updated successfully, but these errors were encountered: