Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passivate edges in carbon nanostructures #600

Open
decerio opened this issue Jul 17, 2023 · 5 comments
Open

Passivate edges in carbon nanostructures #600

decerio opened this issue Jul 17, 2023 · 5 comments

Comments

@decerio
Copy link

decerio commented Jul 17, 2023

Hi,

I work with graphene nanostructures like graphene nanoribbons and nanoporous graphene, and I think there may be many other SISL users that very find useful the agnr, zgnr, graphene_nanoribbons. However if one wants to generate carbon geometries that can be used as input geometries for DFT codes, it is desirable to have the edges correctly passivated with hydrogen (H) atoms.

Even more, edge functionalization with chemical species different from H has been experimentally achieved:

As far as I know, edge passivation is not implemented in SISL, is it? At least, I didn't find it. So it might be interested to add a passivate parameter to agnr, zgnr, graphene_nanoribbons that gives the passivated geometries by setting passivate = True. It could also be added as a method to passivate/functionalize geometries that have already been created (e.g. a porous ribbon) by doing something like geometry.passivate_edges().

My suggestion is something like this:

def passivate_edges(g,bond=1.1,atoms=None,species='H'):
    """
    Passivates atoms with dangling bonds.
    
    Parameters
    ----------
    g: sisl.Geometry
        Geometry
    bond: int, float
        Distance between the passivated edge atom and the new added atom.
        In the case of H passivation this is the C-H bond-length.
    atoms: array, list
        Atomic indices to be considered in the passivation. Only the atoms
        with a dangling bonds (less than 3 nearest neighbours) will be
        passivated. If None is passed, all atoms will be considered
    species: string, int
        Chemical label or atomic number of the atoms that will passivate the
        edge.
    """
    
    gtmp = g.copy()
    if atoms is None:
        atoms = np.arange(gtmp.na)
    for ia in atoms:
        nn = gtmp.close(ia,R=[0.1,1.5])[1]
        if len(nn) < 3:
            vec1 = gtmp.axyz(nn[0]) - gtmp.xyz[ia]
            vec2 = gtmp.axyz(nn[1]) - gtmp.xyz[ia]
            vec3 = -bond*(vec1+vec2)/np.linalg.norm(vec1+vec2)
            edge_atom = sisl.Geometry(xyz=[gtmp.xyz[ia]+vec3],atoms=sisl.Atom(species))
            gtmp = gtmp.add(edge_atom)
    return gtmp

I attach a jupyter notebook that serves as an example of how could this function be used.
example_passivation.ipynb.zip

Do you think it could be interesting?

@tfrederiksen
Copy link
Contributor

Hi @decerio , this idea is related to #202 that also grew out of a need to passivate ribbon edges.

@pfebrer
Copy link
Contributor

pfebrer commented Jul 17, 2023

Welcome to the club 🥇 (of people that want the passivation feature) :)

Apart from #202 I wonder if the problem can now be framed in terms of the new composite geometries about to be merged in #421.

So that you can do something like:

ribbon = sisl.graphene_nanoribbon(...)

passivator = Passivator()

passivated_ribbon = ribbon + passivator

where passivator is a "geometry section" in the terminology of that PR. If the composite geometries kept track of the child sections you could always "undo" to depassivate, which is cool (I don't know if useful).

@pfebrer
Copy link
Contributor

pfebrer commented Jul 17, 2023

Btw I think if you need to deal with very big geometries it would be very useful to have #393, otherwise using Geometry.close will blow up the computation time unnecessarily.

@decerio
Copy link
Author

decerio commented Jul 17, 2023

OK, I see this has been extensively discussed before. It looked so obvious to me that this functionality would be very useful.

@pfebrer thanks! Yes, #393 would be convenient for big geometries.

@zerothi
Copy link
Owner

zerothi commented Jul 19, 2023

Ok, we need to do something here.. The other pr's mentioned are still in the pipeline, however I would like some general method that is applicable to other systems than carbon. I'll try and write a more thorough thought through suggestion :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants