GithubHelp home page GithubHelp logo

jarvist / thedancer.jl Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 532 KB

Polarons + Time-Dependent-Propagation in 1D.

License: MIT License

Julia 99.80% Makefile 0.20%
tightbinding polarisation physics quantum-mechanics

thedancer.jl's Introduction

TheDancer.jl

Build Status Coverage Status codecov.io

Polarons + Time-Dependent-Propagation in 1D.

here

The physical model is a one-dimension string of polarisable dipoles. (These are represented as an N-long array of real numbers, representing the size and direction of the dipole moment.) A tight-binding Hamiltonian is built on this model, with the site energies reconstructed from these dipoles. Solving this Hamiltonian to an electronic density (the lowest energy adiabatic state, from the time independent Schrodinger equation), allows one to allow the dipoles to respond to this electron density.

As a function of discretised time, the electron density digs itself a hole in this simulated dielectric of polarisable dipoles.

The wavefunction can also be propagated by the time dependent Schrodinger equation, and the dipoles updated to this state.

This allows for something that is approaching surface hopping. A random exchange can be made to a different excited state (choice of excited-state wavefunction from diagonalisation of the Hamiltonian).

A plot below shows the S-curve of the dipoles, generating the dimpled site energy surface (red) with the current electron density sitting in the middle of it.

Screenshot

And you can watch some wavepacket propagation videos with lattice response here:

Lattice response to wavepacket

Plan

  • 1D dipoles for polarisation of lattice
  • dipoles respond to adiabatic ground states (i.e. solve TISE for H)
  • evolve simulation in time; (adiabatic electronic structure; step dipoles to respond to lattice - 'AdiabaticPropagation')
  • Create wavepackets + plane waves
  • figure out the realistic parameters of all the values set to 1 (starting with the dt=1 !)
  • add time-dependent Schr. equation for propogation of the wavefunction of interest ('UnitaryPropagation')
  • ? surface hopping by overlap of this wavefn. with the adiabatic solution

thedancer.jl's People

Contributors

jarvist avatar roseteague avatar

Watchers

 avatar  avatar  avatar

thedancer.jl's Issues

Understand units

Currently the code uses reduced units with energies in eV, time steps of '1' and hbar set to 1.

We think we have figured out simulation time step, as being in units of ħ/q seconds (~0.658 fs). [The q here is to convert eV to Joules.]

We need to figure out the rest of the units, and provide a nice way for input/output into SI units.

Implement Surface Hopping

There's a very approximate start to the code needed:-

## Prototype surface hopping implementation
overlaps=abs(overlap(eigvecs(H),psi)) # Overlap of current time-dep ψ with the ADIABATIC set of Φ for this H.
closestAdiabaticState=indmax(overlaps) # index of maximum overlap vector; i.e. this is the adiabatic state with max overlap
println("Wavefunction overlap; polaron c.f. complete set of (adiabatic) states:")
for j in overlaps
@printf("%.2f ",j)
end
println("\nSum overlaps: ",sum(overlaps)," Mean: ",sum(overlaps)/N)
println("Maximum overlap with state $closestAdiabaticState =",overlaps[closestAdiabaticState])
# Should be minimum switching algorithm / partition function sampling
# For now we just randomly jump
if i%50==0
println(" BORED! JUMPING STATE!")
psi=eigvecs(H)[:,closestAdiabaticState+1] # TODO: +1 is a lie; but otherwise it just jumps to the ground state again and again
Plot_S_psi_density_dipoles(S,psi,density,dipoles,title="JUMPING JACK FLASH TO: $closestAdiabaticState")
if PNG outputpng() end
end

The chief thing which is needed to be added is a finite-difference approximation to how the wavefunction is changing as a function of time.

  • Find definite reference to implementation.
  • Break down steps we need to add
  • Clean up and split codes into suitable sectors. (Maybe all code into SurfaceHopping.jl ?)
  • ...

Setting up Tests for the System

@jarvist I'm starting to think about what tests would be appropriate. So far I'm considering an AdiabaticPropagation test and UnitaryPropagation test using a basic 3 site system.

Do you think it would be worth including tests for the individual functions like UpdateDipole and UpdateEnergy as well?

Specify model as explicit TightBindingModel type ?

I've thought a little about the current global const nest of variables.

I think the best way to deal with this may be to pass around an explicit TightBindingModel type.

Something like:

struct TightBindingModel
           N::Int
           dipoles
           psi
end

We can then have a direct constructor function to replace init! and prepare_model, and pass around the model as m, to operate on it:

unitary_propagation!(m::TightBindingModel, t)
    m.psi = 

etc.

I think that will make it more streamline + sensible, and the functions clean (without side-effects). What do you think @roseteague ?

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.