Author Topic: About trajectory files  (Read 3168 times)

0 Members and 1 Guest are viewing this topic.

Offline Fishpack

  • Regular QuantumATK user
  • **
  • Posts: 18
  • Country: kr
  • Reputation: 0
    • View Profile
About trajectory files
« on: May 17, 2017, 07:30 »
Hello, everybody!

I have calculated the phonon lifetime of a graphene layer using molecular dynamics by the normal mode analysis.

Because the highest phonon frequency of the graphene layer is approximately 70 THz, we choose the log interval with 10 steps and 0.5 fs time steps. and the total integration time is 1 ns. That is, the size of the trajectory file can be large.

And the normal mode analysis is required the trajectory file that contains atomic positions at each time.

Here, I have some questions.
1) Is it possible to make the simulation faster? It spends a lot of time to perform the molecular dynamics.

2) Can we make the trajectory file compactly? Actually, I just want the atomic positions at each time step except other information. The trajectory file (.nc) has informations such as force, mass, velocity and so on.

3) Which platform is more faster? Windows vs. Linux? or no difference? Please let me know

Thank you so much.

Offline Julian Schneider

  • QuantumATK Staff
  • QuantumATK Guru
  • *****
  • Posts: 164
  • Country: dk
  • Reputation: 25
    • View Profile
Re: About trajectory files
« Reply #1 on: May 17, 2017, 09:29 »
Hi, This is a known shortcoming for nc trajectories with a small interval. Most of these issues will be solved in the upcoming ATK-2017 version, where we use the HDF5 format to save MD trajectories. There will also be an option to disable storing velocities, forces, and stress to make the file size smaller. For ATK-2016 the workaround to make it at least somewhat faster for such cases is that you switch off  "Save trajectory" (or set
Code
trajectory_filename=None
in the script in the MolecularDynamics function), and instead make sure that you check "Save" in the Molecular Dynamics widget (or add a line 
Code
nlsave('trajectory.nc', md_trajectory)
after the MolecularDynamics block in the script). Then the trajectory is not saved on-the-fly during the simulation, but as a whole after the simulation has completed, which should be faster.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: About trajectory files
« Reply #2 on: May 17, 2017, 19:20 »
With the slight danger that if the calculation terminate midway, nothing is saved at all... For safety, you might want to at least save with a large interval, say 1000 steps instead.

Alternatively, the xyz file format doesn't incur the same overhead, although it doesn't offer the same advanced analysis capabilities.  But for a backup option it serves the purpose.
 
As for Linux vs. Windows, there is typically not a huge difference for this kind of simulations. More important will be to ensure all cores are utilized, because the classical potentials take good advantage of OpenMP threading. So if you don't see all 4 or 12 or however many core you have running atkpython, try setting MKL_NUM_THREADS=the number of cores (if you are using the Job Manager, make a parallel, multithreaded local machine and set the number of threads there).