Author Topic: Doubts in Scripting  (Read 9981 times)

0 Members and 1 Guest are viewing this topic.

Offline Abhilash

  • Regular QuantumATK user
  • **
  • Posts: 9
  • Country: in
  • Reputation: 0
    • View Profile
Doubts in Scripting
« on: July 2, 2013, 08:19 »
Hi all,

I wanted to know the scripting technique that goes into building a system from its unit cell. Let me elaborate.
Initially I gave a graphene unit cell pulled in from the database into the builder. Its unit cell lattice as seen in the editor ( 2.46,6.706)A.

Now if I try to repeat this to A=1, B=3, C=1 and build it, we see that the three vectors are generated in the script which are multiples of the primitive vectors.

The problem I have is I have a set of coordinates of a system built in a different MD platform(LAMMPS) and I want to import them here. Is there any command in nano language to just mention the primitive vectors and coordinates and the builder can build my system? I could successfully write a code to bring the coordinates and element names to the script but not the lattice vectors.

Thanks and regards,
Abhilash Ravikumar
IISc India

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Doubts in Scripting
« Reply #1 on: July 2, 2013, 08:40 »
Can you provide an example of the input you have from the MD simulation, then I might be able to help you.

Offline Abhilash

  • Regular QuantumATK user
  • **
  • Posts: 9
  • Country: in
  • Reputation: 0
    • View Profile
Re: Doubts in Scripting
« Reply #2 on: July 2, 2013, 08:51 »
Respected Sir,

my output file from LAMMPS looks like this:
2   1 6.7   4.5  3.33
12 1 7.7   8.54 3.35
3   2 3.45 6.7   8.9

the columns are atom id, atom type, x ,y, z coordinates respectively. I wrote a C program to generate the elements and coordinates as per ATK nano language syntax and generated a script. But since the lattice vectors also need to be changed I am not getting my required structure. Kindly help me out.

thanks and regards
Abhilash

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Doubts in Scripting
« Reply #3 on: July 2, 2013, 09:05 »
How does the lattice parameters look like in the lammps file?

Offline Abhilash

  • Regular QuantumATK user
  • **
  • Posts: 9
  • Country: in
  • Reputation: 0
    • View Profile
Re: Doubts in Scripting
« Reply #4 on: July 2, 2013, 10:46 »
Respected Sir,

The lattice parameters are defined by the following code in LAMMPS.

lattice custom $a a1 1 0 0 a2 0 1.732051 0 a3 0 0 1.361789 &
              basis 0 0 0 &
         basis 0.5 0.5 0 &
              basis 0.5 0.16666 0 &
              basis 0 0.6666 0

where a= 2.46A. a1, a2, a3 are lattice vectors and the point group symmetry given by the basis. These lattice parameters results in a graphene sheet.

Thanks and regards

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: Doubts in Scripting
« Reply #5 on: July 2, 2013, 11:02 »
Theses give an orthorhombic unit cell of graphene sheet: a = 2.46 ang, b= sqrt(3.0)*  a = sqrt(3.0)*2.46, c= 1.361789* a (however here 1.361789 may be too small, you may use a larger value, e.g., 10, to increase the thickness of vacuum).
The values of "basis" in your lammps commands give the fractional coordinates of carbon atoms in this orthorhombic unit cell of grapheen sheet.
elements = [ Carbon ] * 4
coordinates = [
    ( 0.00, 0.00, 0.00 ),
    (  0.5, 0.5, 0),
   (0.5, 0.16666, 0),
   (0, 0.6666,0)
    ]
g_lattice = SimpleOrthorhombic( a=2.46 * Ang, b= 1.732051* 2.46 *Ang, c=12 *Ang  )
g = BulkConfiguration(
    g_lattice,
    elements,
    fractional_coordinates = coordinates
    )

Offline Abhilash

  • Regular QuantumATK user
  • **
  • Posts: 9
  • Country: in
  • Reputation: 0
    • View Profile
Re: Doubts in Scripting
« Reply #6 on: July 2, 2013, 11:15 »
Thank you so much Sir. I will try it out . :)


Offline Abhilash

  • Regular QuantumATK user
  • **
  • Posts: 9
  • Country: in
  • Reputation: 0
    • View Profile
Re: Doubts in Scripting
« Reply #7 on: July 2, 2013, 12:52 »
Respected Sir,

The problem is I have a deformed graphene sheet with 120 atoms. I have a LAMMPS file with their coordinates as shown in my second reply. With the code you suggested I could build a graphene unit cell but I am still having trouble extending them to 120 atoms. Please find attached the code snippet that I modified for 6 atoms and a screen shot of how the structure was built.

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Doubts in Scripting
« Reply #8 on: July 2, 2013, 12:58 »
Can you share your output file from LAMPS then it is easy to help you implement something?

Offline Abhilash

  • Regular QuantumATK user
  • **
  • Posts: 9
  • Country: in
  • Reputation: 0
    • View Profile
Re: Doubts in Scripting
« Reply #9 on: July 2, 2013, 13:23 »
Sir,

Please find attached the the output file of my LAMMPS simulation.

Thanks and Regards

Abhilash

Offline Nordland

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 812
  • Reputation: 18
    • View Profile
Re: Doubts in Scripting
« Reply #10 on: July 2, 2013, 13:25 »
Isn't there any lattice information in the output?

Offline Abhilash

  • Regular QuantumATK user
  • **
  • Posts: 9
  • Country: in
  • Reputation: 0
    • View Profile
Re: Doubts in Scripting
« Reply #11 on: July 2, 2013, 13:31 »
Sir, the file attached earlier was the LAMMPS Dump file containing the information of the structure built. I have now attached the LAMMPS program I wrote for building the graphene.