Spacegroup info in qmof.json file for DFT relaxed structures. #26
srinidhimula
started this conversation in
General
Replies: 1 comment 2 replies
-
Hi Srinidhi, Certainly, that's possible! This can be done using Pymatgen's interface to spglib via the from ase.io import read
import numpy as np
from pymatgen.io.ase import AseAtomsAdaptor
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
adaptor = AseAtomsAdaptor()
mofs = [adaptor.get_structure(mof) for mof in read('qmof-geometries.xyz',index=':')]
refcodes = np.genfromtxt('qmof-refcodes.csv',delimiter=',',dtype=str)
spacegroups = {}
symprec = 0.1
for i, mof in enumerate(mofs):
spacegroup = SpacegroupAnalyzer(mof,symprec=symprec).get_space_group_symbol()
print('Spacegroup for '+refcodes[i]+' = '+spacegroup)
spacegroups[refcodes[i]] = spacegroup Because the DFT relaxations were done without symmetry constraints (and in some cases, such as for the hypothetical MOFs, the starting structures were not high symmetry), you may need to tweak |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I would like to filter based on spacegroup and get info of the relaxed MOF structures from the qmof.json file. Later I would like to use these relaxed structures for property calculations of my interest. Is it possible to get the spacegroup information from the current files?
Thanks
Srinidhi
Beta Was this translation helpful? Give feedback.
All reactions