QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: DSarkar on April 12, 2016, 03:08

Title: Extracting bulk structure without going through movie tool
Post by: DSarkar on April 12, 2016, 03:08
Hi,

As described in several tutorials, we can extract the position and velocity of atoms in an ensemble from any time point in a simulation run by opening the "xyz.nc" file using the Movie Tool, and sending the configuration to the required module (builder, script generator, etc.). While this is a very convenient method for many applications, for relatively large system and/or simulation sizes, this method is quite time consuming. So I was wondering if it is possible to do either of the following:
1. Extract the bulk structure using some script at any time step without opening the "xyz.nc" file in the Movie Tool.
2. Open the file in the Movie Tool and run some script to select the bulk structure at, say the time step currently selected there, and send it to one of the modules.
Any suggestion/advice is highly appreciated.

Regards,

Debarghya
Title: Re: Extracting bulk structure without going through movie tool
Post by: Julian Schneider on April 12, 2016, 09:07
You can easily do it in a script, e.g. like this

Code
# Read the trajectory. You don't need to do this if you already have the trajectory.
md_trajectory = nlread('xyz.nc', MDTrajectory)[0]

# Extract the 3rd snapshot.
bulk_configuration = md_trajectory.image(2)

(MDTrajectory has a number of other query functions that might be useful for you, see http://www.quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.mdtrajectory.html)

If you want to use the snapshot in the parts of the VNL-GUI (Builder, ScirptGenerator), you need to go through the MovieTool, though.

Does that help?[/code]
Title: Re: Extracting bulk structure without going through movie tool
Post by: DSarkar on April 13, 2016, 16:50
Yes, it does. Thank you.