Author Topic: Import and export of CAR files  (Read 12778 times)

0 Members and 1 Guest are viewing this topic.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Import and export of CAR files
« on: February 3, 2010, 18:12 »
The attached files implement support for importing and exporting CAR files in NanoLanguage for ATK 2008.10. There are two versions of CAR files, as seen from the header (first line), which will say "!BIOSYM archive 3" for version 3 and archive 1 for version 1. The script handles both. I'm not sure if there's a version 2, let me know if you come across it. A simple usage example would be:
Code
from ATK.KohnSham import *
from car import *

imported_configuration = importCARfile('testfile.car')
There is also an export function, which takes 4 parameters:
Code
exportCARfile(filename, configuration, CARversion, configname)
where CARversion and configname are optional (default version is 3). I wish to point out that this is a rather experimental first effort. I didn't have too many CAR files to test with... In particular, I don't know if the conversion of the unit cell shape works in all cases. Therefore, please do let me know of any problems you have using this tool (and naturally attach any CAR files that fail to import properly). There is an explicit assumption that the first unit cell vector A lies along X, that A and B span the X/Y plane and that the angle between them is [tex]\gamma[/tex]. The third vector C follows from the definition of [tex]\alpha[/tex] and [tex]\beta[/tex] as the angles between  B and C, and A and C, respectively.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Import and export of CAR files
« Reply #1 on: February 3, 2010, 18:27 »
Some more notes:


Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5394
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: Import and export of CAR files
« Reply #2 on: February 3, 2010, 21:14 »
As a bit of an experiment I also made a Custom Builder for VNL 2010.01 (or later, and some earlier) versions. Drop the attached file on the Custom Builder icon, then select CAR, and drop your CAR file on the file drop-zone.

Note that this script also includes the XYZ and old-style VNL two-probe import, as in the built-in "Importer" Custom Builder.


Offline zdhlover

  • Global Moderator
  • QuantumATK Guru
  • *****
  • Posts: 106
  • Reputation: 2
    • View Profile
Re: Import and export of CAR files
« Reply #3 on: February 4, 2010, 12:32 »
 ;D ;D ;D
Very good and splendid work !
Thanks!