Comments (2)
Hi Chenqiang
I'm not certain if you really want to use the map_probability_at-function. This function tries to select the state in the wavefunction (set of eigenvectors) that co insides with the selected position, and gives the probability of that state (eigenvector). You thus only see a selection of the wavefunction.
We are currently working on a new release. You can download the new release by first removing your old version of Pybinding with pip uninstall pybinding
and then running pip install -i https://test.pypi.org/simple/ pybinding
.
In the new version, you have the possibility to calculate the wavefunction and a lot of new interesting things.
Regarding your question: the plot you get is a kind of scatter plot with some interesting decorations. It just puts all the eigenvalues from 0 to 100 on a plot. I think this is not that interesting at all, but the functionality is there if you want to use it. I rather suggest using the spatial-LDOS. Now, you can calculate the wavefunction over an area and obtain an accurate approximation for this.
You can obtain the current axis in matplotlib with ax=plt.gca()
. The rest works as expected.
Bellow an example of the new functionalities:
import pybinding as pb
import numpy as np
import matplotlib.pyplot as plt
from pybinding.repository.graphene import bilayer
def asymmetric_strain(c):
@pb.site_position_modifier
def displacement(x, y, z):
ux = -c/2 * x**2 + c/3 * x + 0.1
uy = -c*2 * x**2 + c/4 * x
return x + ux, y + uy, z
return displacement
model = pb.Model(bilayer(), pb.regular_polygon(num_sides=3, radius=1.1), asymmetric_strain(c=0.42))
solver = pb.solver.lapack(model)
eigen = solver.calc_eigenvalues(map_probability_at=[0,0])
fig, (ax1, ax2) = plt.subplots(2)
eigen.plot_heatmap(ax=ax2)
ax2.set_xlim([20, 100])
ax2.set_ylim([-5, 5])
wfc = solver.calc_wavefunction([0, 0], [0, .1])
sldos = wfc.spatial_ldos(np.linspace(-1, 1, 100), 0.05)
sldos.structure_map(0).plot(ax=ax1)
from pybinding.
Thanks sir! I have installed the new version and it fixs my question well! I can't wait to explore new interesting things in this new version.
Thx again!
Chenqiang Hua
from pybinding.
Related Issues (20)
- (removed)
- The calc_conductivity in KPM takes in temperature as a number in the input variables
- Obtaining Atomic Basis Sets for Materials in Source Code HOT 2
- can not install on windows HOT 5
- Addition of Hermitian conjugate HOT 1
- how to use Polygon.contains ? HOT 4
- installation with pip fails HOT 4
- pybinding returns an error for a 1D lattice defined by the book (literally) HOT 1
- Non-hermitian matrix HOT 2
- Pip installation fails on windows HOT 3
- ERROR: Failed building wheel for pybinding HOT 2
- pybinding can not run on MAC with M3 chip. HOT 4
- Modifying specific hoppings HOT 4
- calculation of band structure in the presence of magnetic field HOT 2
- Translational symmetry with generator defined hoppings HOT 1
- Is it possible to write the Hamiltonian into wannier90 format? HOT 3
- Difficulty installing locally (windows 11 & wsl) HOT 3
- What does `translational_symmetry` actually perform? HOT 4
- Problem while installing pybinding HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pybinding.