Unlike Graphene and MoS2, For borophene, I didn't find any inbuilt function in ASE. I have tried to make it, but i failed. So If anyone could help me, it will be great help.

Since brophene has graphene like structure,I have tried to make it like graphene, although I think it's wrong approach.

from ase.visualize import view
from ase import Atoms
from ase.build import hcp0001


slab = hcp0001('B',a=4.7, size=(5,8,1), vacuum=None, orthogonal=True)


cell = [[10.0, 0.0, 0.0],
        [0.0, 10.0, 0.0],
        [0.0, 0.0, 10.0]]


from gpaw import GPAW
calc = GPAW(xc='PBE')


opt = BFGS(slab,



2 Answers 2


As you said, borophene has the same structure as graphene. Then you can first build a graphene structure in ASE, then change every atom to boron, and scale the lattice parameters to be that of a borophene. Here is the code (the lattice constant values might not be right so you need to double check that)

from ase.build import graphene
from ase.visualize import view

# Build a graphene monolayer
atoms = graphene()
a_borophene = 2.90
a_graphene = 2.46
scaling_factor = a_borophene / a_graphene
# Save the fractional coordinates 
fracs = atoms.get_scaled_positions()
# Scale the unit cell x and y dimensions by the scaling factor
atoms.cell *= (scaling_factor, scaling_factor, 1)
# Scale the atomic coordinates
atoms.positions = fracs @ atoms.cell
# Change carbon atoms to boron
for atom in atoms:
    atom.symbol = 'B'
# Center the structure in the z direction
atoms.center(vacuum=5., axis=2)
# Visualize

And there you have it

enter image description here


You could define the formula for a graphene-like structure. For example, ase.build.graphene(formula='B2', a=2.46, thickness=0.0, size=(1, 1, 1), vacuum=None)

  • 1
    $\begingroup$ Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. $\endgroup$
    – Community Bot
    Commented Aug 15, 2023 at 12:49
  • $\begingroup$ I recommend expanding this answer (see the other answer for example). $\endgroup$ Commented Aug 15, 2023 at 12:50
  • $\begingroup$ Yeah I forgot you can simply do that. Good answer. $\endgroup$
    – Shaun Han
    Commented Aug 15, 2023 at 14:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .