[ase-users] band structure of carbon nanotubes
Jakob Schiotz
jakob at schiotz.dk
Wed Sep 4 13:44:41 CEST 2024
Hi Deepak,
The nanotube is replicated correctly in the z-direction. The module finds the shortest length where it can be repeated without introducing defects, and then returns a multiple of that length. So length=4 means return a nanotube four times longer than the minimal repeat length.
Try setting up some nanotubes, view them in the ASE GUI and repeat them in the z direction to check that it is correct.
Your script contains several weird things:
atoms1.cell = Cell.fromcellpar([4, 4, 4, 90, 90, 90])
Here you overrule the unit cell set by the nanotube module, so now it no longer connects correctly in the z direction. Instead, use
atoms1.center(vacuum=XXX, axes=(0,1))
to add the desired amount of vacuum in the x and y directions.
Always view the generated structure with the ASE GUI before you run calculations, then you see if it is absurd (we all make absurd structures now and then!). And repeat it in all three directions to see if the boundary conditions make sense.
write('66cnt.traj', atoms1)
write('cnt.xyz',read('66cnt.traj'))
The first line writes the file '66cnt.traj'. The second line reads that file back in, and rewrites it as 'cnt.xyz'. Why don't you just write it directly as a .xyz file if that is what you want?
I have not used the band structure module for ages, so I have no comments on that part.
Best regards
Jakob
> On 4 Sep 2024, at 11.58, Dr. Ojha Deepak via ase-users <ase-users at listserv.fysik.dtu.dk> wrote:
>
> Dear ASE/GPAW users,
> I would like to calculate the band structure of carbon nanotubes of chirality like (6,2), (6,4) and (6,6) using ASE/GPAW. I have a doubt about the structure of carbon nanotube being properly replicated in z-axis as built using ASE. My python script is given below:
> ----------------------------------------------------------------------------------------------------------
> from gpaw import GPAW, PW
> from ase import Atoms
> from ase.build import nanotube
> from ase.cell import Cell
> from ase.visualize import view
> from ase.io import read, write;
> atoms1 = nanotube(6, 6, length=4)
> atoms1.cell = Cell.fromcellpar([4, 4, 4, 90, 90, 90])
> atoms1.set_pbc((True, True, True))
> write('66cnt.traj', atoms1)
> write('cnt.xyz',read('66cnt.traj'))
> calc = GPAW(mode=PW(800), kpts=[8, 8, 8], xc='revPBE',
> txt='gpaw.cnt1.txt')
> atoms1.calc = calc
>
> atoms1.get_potential_energy()
> calc.write('66cnt.gpw')
>
> path = atoms1.cell.bandpath(density=7)
> path.write('path.66cnt.json')
> print('path')
> calc = calc.fixed_density(kpts=path, symmetry='off')
>
> bs = calc.band_structure()
> bs.write('bs.66cnt.json')
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Apart from it, the length=4 is probably not Angstroms or nanometers. In that case how do i define hte cell for my nanotube. I am not certain if the script is absolutely correct, so for any other suggestion, I will be highly obliged.
>
> Thanks and Best Regards,
> Deepak
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
More information about the ase-users
mailing list