Giter VIP home page Giter VIP logo

Comments (2)

r2stanton avatar r2stanton commented on August 17, 2024

Hi just to be sure we're talking about the same thing, is what you're referring to here pretty much the same as the "Alternating Cation (ACI) Phase"? (circled in blue below, this is Figure 1 from https://doi.org/10.1038/s41565-020-00811-1)

I have played a bit with adding these phases, but they're not currently in the codebase. One thing that has held up the implementation is that ACI phases in the literature (the paper you've shown above is a good example) consist of both DJ and RP phases where adjacent layers sometimes share, and sometimes don't share a spacer. So the implementation for those shifts in adjacent layers gets a bit more involved and dependent on the "base" phase so to speak.

There's a bit of a quick fix that can be done which hopefully will be able to work for your systems. It requires some playing with the numbers depending on the system, and checking that it doesn't result in overlapping atoms (tends to happen for many spacers in the DJ ACI phase unfortunately, this is the primary reason it's not in the code yet). Either way though, I've been able to use something like this to get ACI phases, so hopefully it can work for you as well for now before I can properly implement in the code:

perov = make_2drp(...)

translate_list = []
spacer_z_height =# Just below the lowest z-coordinate of spacers you want shifted
BX_z_height = # Just below the lowest z-coordinate of BX atoms you want shifted 

BX_list = ["Pb", "I"] # List of your B, X components.
spacer_list = ["C", "H", "N", "O"] # List of species in spacers

# Select the atoms by type above some certain height for the shift.
for atom in perov:
    if atom.symbol in spacer_list and atom.position[2] > spacer_z_height:
        translate_list.append(atom.index)
    if atom.symbol in BX_list and atom.positions > BX_z_height:
        translate_list.append(atom_index)
        
# Then loop over and translate the atoms in translate_list by the desired amount.
# This is the main tricky part to get right while avoiding atoms colliding.

image

from pyrovskite.

r2stanton avatar r2stanton commented on August 17, 2024

Closing for now, trying to overhaul some things within the builder module before adding the ACI phase to aid in dealing with spacers/organic cations with abnormal geometries.

from pyrovskite.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.