Author Topic: reading x,yz + vx vy vz files with vnl  (Read 4095 times)

0 Members and 1 Guest are viewing this topic.

Offline Cyrille

  • Heavy QuantumATK user
  • ***
  • Posts: 62
  • Country: fr
  • Reputation: 0
    • View Profile
reading x,yz + vx vy vz files with vnl
« on: September 25, 2015, 08:41 »
Hello

I was wondering if the builder of vnl is able to read (and represent) graphically files of the type
Atom x y z vx vy vz
where x y z is the position of atom "Atom" and vx vy vz is a vector centred  at x,y,z

Cyrille

========================
Cyrille Barreteau
CEA Saclay, IRAMIS, SPEC Bat. 771
91191 Gif sur Yvette Cedex, FRANCE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DTU Nanotech
Ørsteds Plads, building 345E
DK-2800 Kgs. Lyngby,  DENMARK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+33 1 69 08 29 51 /+33  6 47 53 66 52  (mobile)   (Fr)
+45    45 25 63 12/ +45     28 72 55 18  (mobile)  (Dk)
email:     cyrille.barreteau@cea.fr  /cyrbar@nanotech.dtu.dk
Web:     http://iramis.cea.fr/Pisp/cyrille.barreteau/
========================

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: reading x,yz + vx vy vz files with vnl
« Reply #1 on: September 25, 2015, 10:45 »
What is the purpose of the vector? Oh, like a force vector?
You can definitely write a plugin to visualize such data, yes :)
You just need to interpret the file as a Forces object.

Offline Cyrille

  • Heavy QuantumATK user
  • ***
  • Posts: 62
  • Country: fr
  • Reputation: 0
    • View Profile
Re: reading x,yz + vx vy vz files with vnl
« Reply #2 on: September 25, 2015, 11:06 »
It could be a force but in my case it is a magnetic non-collinear configuration.
In fact this is the result of a magnetic calculation using another code than atk but I am looking for a software that would allow to visualize my result.
I have tried with xcrysden but I am not really satisfied with the result..

Cyrille

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: reading x,yz + vx vy vz files with vnl
« Reply #3 on: September 25, 2015, 16:37 »
Ok, so the really proper way would be to import the data as a MullikenPopulation object, but then you would have to include some information about the populations too. So a hacky way that would work easier would be to use a Forces object anyway - at least this will allow you to see the arrows, as you drop the Forces object on the Viewer. The proper way to do this is to make a LabFloor plugin, but for testing, you could just make a Python script that reads you file, makes a Forces object, and nlsave-s it - then you can import the NC file in VNL. To make a new Forces object:
Code
from NanoLanguage import *
# Read and parse data file, store x,y,z coordinates as Nx3 numpy.array (Angstrom unit assumed)
coordinates = []
# Read and parse data file, store "forces" as Nx3 numpy.array, no unit
my_forces = []

# Make a NanoLanguage Forces object
forces = Forces.__new__(Forces)
forces._Forces__forces = my_forces*eV/Angstrom
forces._Forces__forces_origin = coordinates*Angstrom
nlsave("file.nc", forces)
« Last Edit: September 25, 2015, 16:49 by Anders Blom »