QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: mmg016 on January 11, 2018, 09:53

Title: import multi frame xyz file
Post by: mmg016 on January 11, 2018, 09:53
Dear all,
 
I would like to import an .xyz file with multiple frames in it. I am attaching a sample xyz file with multiple frames. Could someone help me to import this in the builder of virtual nanolab. Thank you.

Regards.
Title: Re: import multi frame xyz file
Post by: Ulrik G. Vej-Hansen on January 11, 2018, 13:42
Unfortunately, it cannot be imported directly into the Builder. I suggest that you use the following approach:

* Divide each image into separate files, possibly with the use of a shell script.
* If you want the images separately, you can then import each file on its own.
* If you would like a trajectory instead, you need to first convert the configurations in a script as explained in the documentation here: https://docs.quantumwise.com/tutorials/vnl_io_import/vnl_io_import.html
* Afterwards, or in the same script of course, you can collect the different configurations into a trajectory by using this function: trajectory._addConfiguration(bulk). Note that the underscore shows that we do not ensure backwards compatibility in new releases for this function.

I realize this method is a little more cumbersome, but it also strength of the Python interface, allowing you to do things that are not implemented in VNL.