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

propagation of MAGMOM and visualisation of magnetic ordering #9

Open
badw opened this issue Feb 5, 2021 · 1 comment
Open

propagation of MAGMOM and visualisation of magnetic ordering #9

badw opened this issue Feb 5, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@badw
Copy link
Member

badw commented Feb 5, 2021

It would be a nice feature to be able to generate surfaces with the magnetic orderings (either collinear or non-collinear) from the bulk relaxed orderings.

this should be doable with pymatgen as you can add_site_property to your structure.

My current hack-and-slash approach is to

bulk_poscar.add_site_property('magmom',vasprun.as_dict()['input']['incar']['MAGMOM'])

then after you have generated your slab from bulk_poscar reorder the magmoms for visualisation and for setting the MAGMOM in the INCAR (if taking a manual route) to:

def magnetism_identify(slab,magmom):
    for i,specie in enumerate(slab.as_dict()['sites']):
        if specie['properties']['magmom'] == magmom:
            slab.replace(i,'Sc')
    magnetic_slab = slab.get_sorted_structure() 
    return(magnetic_slab)

where the atoms with a +ve MAGMOM is replaced with a 'Sc' atom then sorted so that you can edit the POSCAR in such a way that you have all the spin-ups as Sc and all the spin-downs as the original atom. - > useful for visualisation

this is a bit of a dirty way of doing this, but it makes for easy visualisation.

image

@badw badw added the enhancement New feature or request label Feb 5, 2021
@brlec
Copy link
Collaborator

brlec commented Aug 16, 2021

Hi, I've (finally) made it so the generate_slabs function can take a pymatgen Structure object as the bulk structure. So you could add magmoms to the bulk with add_site_property(), pass it to surfaxe and the magmoms will get propagated as the slabs are generated. Not really sure where to really put the visualisation bit so might just leave it out for now if that's alright 😬

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

No branches or pull requests

2 participants