pierrehirel / atomsk

Atomsk: A Tool For Manipulating And Converting Atomic Data Files -
https://atomsk.univ-lille.fr
GNU General Public License v3.0
203 stars 75 forks source link

Is it possible to transform lattice just like the make_supercell() method done in pymatgen or 'Redefine Lattice' in VASPKIT? #51

Closed KylinGuo closed 7 months ago

KylinGuo commented 8 months ago

I am new to Atomsk and would appreciate guidance on utilizing Atomsk to transform a lattice matrix using a specified transformation matrix. Allow me to provide additional details regarding my query.

I have an exemplary structure represented in the VASP POSCAR file format, denoted as POSCAR_120.vasp. My objective is to apply the transformation matrix M to this structure and generate a modified version, saved as POSCAR_60.vasp.

$ cat POSCAR_120.vasp 
CrSTe
   1.0000000000000000
     3.4619999999999997    0.0000000000000000    0.0000000000000000
    -1.7309999999999992    2.9981799479017264    0.0000000000000000
     0.0000000000000000    0.0000000000000000   20.0000000000000000
   Cr   S    Te
     1     1     1
Selective dynamics
Direct
  0.0000000000000000  0.0000000000000000  0.5000000000000000   F   F   F
  0.3333333333333357  0.6666666666666643  0.5607565969958570   F   F   T
  0.6666666666666643  0.3333333333333357  0.3988907086676957   F   F   T
$ cat POSCAR_60.vasp 
CrSTe
   1.0000000000000000
     3.4619999999999997    0.0000000000000000    0.0000000000000000
     1.7310000000000005    2.9981799479017264    0.0000000000000000
     0.0000000000000000    0.0000000000000000   20.0000000000000000
   Cr   S    Te
     1     1     1
Selective dynamics
Direct
  0.0000000000000000  0.0000000000000000  0.5000000000000000   F   F   F
  0.6666666666666714  0.6666666666666643  0.5607565969958570   F   F   T
  0.3333333333333286  0.3333333333333357  0.3988907086676957   F   F   T

The transformation matrix M is

$ cat TRANSMAT 
Read transformation matrix from the TRANSMAT.in file if it exists. 
    1    0    0          # must be three integers
    1    1    0          # must be three integers
    0    0    1          # must be three integers
pierrehirel commented 7 months ago

Dear Sir,

At the moment it is not possible to provide rotation matrices to Atomsk. To transform an atomic system you have to use options such as "-deform", "-rotate", "-orient".

Best regards

KylinGuo commented 7 months ago

Dear Sir,

At the moment it is not possible to provide rotation matrices to Atomsk. To transform an atomic system you have to use options such as "-deform", "-rotate", "-orient".

Best regards

Dear Pierrehirel, thank you for your reply!