Skip to content
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

Memory Optimization Using OVITO Pipeline #476

Closed
N720720 opened this issue Jun 9, 2024 · 1 comment · Fixed by #477
Closed

Memory Optimization Using OVITO Pipeline #476

N720720 opened this issue Jun 9, 2024 · 1 comment · Fixed by #477
Assignees
Labels
enhancement New feature or request

Comments

@N720720
Copy link
Owner

N720720 commented Jun 9, 2024

Description:

When analyzing molecular dynamics trajectories to calculate the Lindemann index, it's essential to manage memory efficiently, especially for large datasets. Currently, the process of loading entire trajectories into memory can be optimized by leveraging OVITO's on-demand pipeline capabilities.

Problem:

  • Memory Usage can be optimized. Loading entire trajectories into memory is not always feasible, particularly for large datasets.

Solution:

By using OVITO's on-demand frame loading capabilities, we can significantly reduce memory usage. OVITO's pipeline system allows for frames to be loaded as needed, rather than all at once. This way, we can efficiently calculate the Lindemann index without excessive memory consumption.

Key Insight:

The use of Welford's online algorithm for calculating the Lindemann index is crucial in this approach. Its ability to update mean and variance incrementally allows us to take full advantage of OVITO's on-demand pipeline. This means we can process each frame individually and update our calculations without needing to store all frames in memory simultaneously.

Implementation:

The approach involves two main components:

  1. Trajectory Loader: Efficiently loads trajectory frames one at a time using OVITO's pipeline, thus minimizing memory usage.
  2. Lindemann Index Calculation: Computes the Lindemann index using Welford's online algorithm to update the mean and variance of distances incrementally.

Benefits:

  1. Reduced Memory Usage: The on-demand loading mechanism ensures only the necessary data is in memory, making it suitable for large trajectories.
  2. We can reduce the memory usage from $f * n* \frac{(n-1)}{2}$ to $n*n$, where $f$ is the number of frames and $n$ is the number of atoms.

Documentation Reference:

For more details on OVITO's data import and on-demand frame loading, refer to the OVITO documentation.

@N720720 N720720 added the enhancement New feature or request label Jun 9, 2024
@N720720 N720720 self-assigned this Jun 9, 2024
N720720 added a commit that referenced this issue Jun 10, 2024
N720720 added a commit that referenced this issue Jun 11, 2024
@N720720 N720720 linked a pull request Jun 11, 2024 that will close this issue
11 tasks
@N720720
Copy link
Owner Author

N720720 commented Jun 11, 2024

memory_used_ot_t_old_t

We can significantly reduce memory usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging a pull request may close this issue.

1 participant