Author Topic: how can I extract XYZ from each MD step?  (Read 4049 times)

0 Members and 1 Guest are viewing this topic.

Offline mbjavan

  • Regular QuantumATK user
  • **
  • Posts: 9
  • Reputation: -1
    • View Profile
how can I extract XYZ from each MD step?
« on: November 10, 2013, 08:32 »
Dear ATK users,

is it possible to extract some date such as XYZ of the atomic structure from
each arbitrary step of MD calulation in ATK13.8?
it seems that the option of "export to clipboard" has been considered for this aim. But how does it work?
when i try to add MD configuration from clipboard in builder, there is nothing for showing?

Regards



Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: how can I extract XYZ from each MD step?
« Reply #1 on: November 11, 2013, 07:36 »
The following script would give you the entire MD as a XYZ script:

md = nlread("your_file.nc", MDTrajectory)
md.writeToXYZ("export.xyz")

Offline mbjavan

  • Regular QuantumATK user
  • **
  • Posts: 9
  • Reputation: -1
    • View Profile
Re: how can I extract XYZ from each MD step?
« Reply #2 on: November 12, 2013, 08:16 »
Dear Prof. Nordland,

The following error is seen:

<module>
    md.writeToXYZ("export.xyz")
AttributeError: 'list' object has no attribute 'writeToXYZ'


Online Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: how can I extract XYZ from each MD step?
« Reply #3 on: November 12, 2013, 10:23 »
It should have been
Code: python
md = nlread("your_file.nc", MDTrajectory)[0]
md.writeToXYZ("export.xyz")
Note that the produced XYZ file is not 100% standard - for instance it writes Carbon instead of C and also contains the velocities. Nothing a bit of search and replace can't fix though :)
« Last Edit: November 16, 2013, 22:45 by Anders Blom »

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: how can I extract XYZ from each MD step?
« Reply #4 on: November 13, 2013, 08:31 »
This is not a RASMOL XYZ file. It is the XYZ fileformat for VMD (http://www.ks.uiuc.edu/Research/vmd/) - so you can use it directly to view MD simulations using this program.

Online Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5575
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: how can I extract XYZ from each MD step?
« Reply #5 on: November 16, 2013, 22:44 »
At least VMD is tolerant to the extra columns. I'm not 100% sure it accepts "Carbon" instead of "C", however.