Hi everyone,
I wonder if there is any subpackage in pymatgen can help me lifting an surface layer of a slab structure with 0.2Å increment (from 2Å - 5Å) and write it into POSCAR format to perform crack initiation test.
Here is an example
POSCAR file
1.00000000000000
0.0000000000000000 0.0000000000000000 -4.9935999999999998
-4.3245844599999996 0.0000000001000000 2.4967999999999999
0.0000000000000000 41.3633999999999986 -0.0000000004000000
Cr Fe O
10 24 15
Selective dynamics
Direct
0.3514277164107921 0.6907049529237036 0.3360449354706682 T T T
0.6723760709429016 0.4075823983139003 0.3736943951592519 T T T
0.9479207188265740 0.9724474079673007 0.3706400244759484 T T T
0.2617487971845416 0.6907609695464666 0.4233634401920597 T T T
0.9881900877704727 -0.0116999314849779 0.4280450420952487 T T T
0.2893505895297185 0.6931712775084026 0.4802452474270836 T T T
0.5851658341304642 0.2906045538818027 0.4762435910074906 T T T
0.9272200336548112 0.9653393177405936 0.5309163533682427 T T T
0.6339373444534714 0.3820419944223448 0.5332686281224046 T T T
0.3140539881041046 0.6721136696657830 0.5683855293813306 T T T
0.1666666650000010 0.3333333349999990 0.0559285849999966 F F F
0.1666666650000010 0.8333333349999990 0.0559285849999966 F F F
0.6666666650000010 0.3333333349999990 0.0559285849999966 F F F
0.6666666650000010 0.8333333349999990 0.0559285849999966 F F F
0.3369065168727638 0.1854341988110731 0.2938774571544731 T T T
0.3374054300480825 0.6665161054082195 0.2904954615644242 T T T
0.8244321165308205 0.1681676604025589 0.2937505101724555 T T T
0.8481311017587185 0.6731526193764762 0.2937362747893189 T T T
0.0030563489535511 0.0067540173480085 0.2484276577972868 T T T
0.9847826829734412 0.4931786586376498 0.2463107060608104 T T T
0.5034911770606328 0.0212029737920214 0.2466004471029293 T T T
0.5174067960293125 0.5005212639591873 0.2462724475614931 T T T
I would like to lift the BOLD section of the poscar in Z-direction by 0.2Å increment up to 5Å.
Does anyone has study similar problem? I have been doing it manually and would like to speed up the process since I have 30+ POSCAR structures that I need to perform crack test.
I tried mpinterface.interface.Interface but it gave me this error
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
in
----> 1 from mpinterfaces.calibrate import CalibrateSlab
2 from mpinterfaces.interface import Interface
3 from mpinterfaces.transformations import *
4 from mpinterfaces.utils import *
5
~/.local/lib/python3.8/site-packages/mpinterfaces/calibrate.py in
36 import numpy as np
37
—> 38 from pymatgen import Lattice
39 from pymatgen.core.structure import Structure
40 from pymatgen.core.surface import SlabGenerator
ImportError: cannot import name ‘Lattice’ from ‘pymatgen’ (unknown location)