ksyang2013 / aimsgb

Ab-initio Interface Materials Simulation Project for Grain Boundaries (AIMSGB)
Other
58 stars 20 forks source link

Rotation Axis [111], Grain Boundary Plane (1 -2 1) is not generating the structure #15

Open maaliso opened 6 months ago

maaliso commented 6 months ago

Hi everyone,

I am trying to use the aimsgb python version to generate Rotation Axis [111], Grain Boundary Plane (1 -2 1) grain boundaries, but it is not working on the python interface. I tried the same with the website interface and it working and generating a structure. Is there any special thing about this specific arrangement or structure?

My code is:

atoms = Grain.from_file(f'uc_relaxed.POSCAR')
gb = GrainBoundary([1, 1, 1], 3, [1, -2, 1], atoms, uc_a=i+1, uc_b=i+1)
structure = Grain.stack_grains(gb.grain_a, gb.grain_b, direction=gb.direction)
structure.to(filename=f'{i}_{gb_name}.POSCAR')

When I try this code, I always get a unit cell in the output even though the same code is generating all other structures that I have used.

Thanks in advance for your help!!

jic198 commented 6 months ago

Hello,

Your code looks good to me. Do you mind sharing your input file here? I will test it from my side.

maaliso commented 6 months ago

uc_relaxed (copy).txt Hi jic198, Thanks for your reply. This is the POSCAR file, where the unit cell is. I just changed the extension of the file so that it will be attached to the comment.

jic198 commented 6 months ago

I used your POSCAR file and it generated the structure I expected. I used uc_a=3, uc_b=3. Is it not what you wanted? POSCAR.txt

image
maaliso commented 6 months ago

Yes, it is what I want. I see. Interesting. I got this too with the web interface, but I don't know why I don't get it from the python package of aimsgb. code_for_gb_generation.txt

I will attach the python file with I used right now to replicate what you did, with the output and everything and I didn't remove the mistakes even. If you have time and can check this, I would appreciate it. Otherwise, maybe I need to update the version of aimsgb that I have.

jic198 commented 6 months ago

I didn't see any error in your code. Could you update aimsgb and try again?