Giter VIP home page Giter VIP logo

tfrederiksen / inelastica Goto Github PK

View Code? Open in Web Editor NEW
33.0 9.0 16.0 24.03 MB

Python package for eigenchannels, vibrations and inelastic electron transport based on SIESTA/TranSIESTA DFT

Home Page: https://tfrederiksen.github.io/inelastica

License: GNU Lesser General Public License v3.0

Python 75.91% Batchfile 0.06% Fortran 3.05% Mathematica 16.46% Jupyter Notebook 4.51%
physics negf siesta transiesta phonons electron-phonon iets eigenchannels quantum-transport dft

inelastica's People

Contributors

alguaa avatar brandimarte avatar eminamitani avatar jonaslb avatar manexalkorta avatar mpn2 avatar tfrederiksen avatar zerothi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

inelastica's Issues

Inquiry about EigenChannels limitations

Good afternoon to whom it may concern,
I was trying to calculate the EigenChannels for different phospherene/graphene systems with different number of atoms.
Some would end successfully. But as the number of atoms increases ( by a 100 or so) the job would be killed.
I wanted to ask if there are limits to EigenChannels? If not, can it be run parallel?
thank you very much and looking forward to your thoughts

Inquiry about Eigenchannel script

Good evening,
I was wondering if the Eigenchannel script would run properly despite not having the following: (TS.TBT.Npoints, TS.TBT.Emin, TS.TBT.Emax) SiestaIO

which was recommended based on the website: http://dipc.ehu.es/frederiksen/tstutorial/index.php/Inelastica

The reason i am asking is because despite the run looking normal:
update1.txt

i got no eigenchannels around the fermi level and I want to make sure that everything is correct.

I guess in other words my question is how to properly know if the script worked properly?

Thank you very much and looking forward to your reply.
EL-abed

Build fail.

Inelastica will not build if only the source code is downloaded (without cloning the repo).

Traceback (most recent call last):
  File "setup.py", line 171, in <module>
    write_version()
  File "setup.py", line 169, in write_version
    description=GIT_DESCR))
IndexError: list index out of range

Bug in findLattice methode at Symmetry module

Depending on how the atoms are defined with respect to the cell origin, one can get an error when trying to find the lattice parameters.

=======================================================================
INELASTICA VERSION : v1.3.0-69-g49b4ed2
RUNNING BANDSTRUCTURES : Fri Mar  2 22:53:35 2018

OPTIONS :
     AtomicMass --> []
     DestDir --> aver
     FCwildcard --> ./FC*
     Logfile --> Bandstructures.log
     kfile --> None
     mesh --> [0,0,0]
     nbands --> None
     onlySdir --> ./OSrun
     onlyTSdir --> .
     qfile --> None
     radius --> 0.0
     sorting --> False
     steps --> 100
=======================================================================
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/RUN.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/STRUCT.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/RUN.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/STRUCT.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/RUN.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/STRUCT.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/RUN.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/STRUCT.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/RUN.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/STRUCT.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/RUN.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/STRUCT.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/RUN.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/STRUCT.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/RUN.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/STRUCT.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/RUN.fdf
io.siesta.ReadFDFLines: Reading /home/pedro/machines/oberon/pedro/doc/Ge2probe/surfGe/relax_big/results_new/STRUCT.fdf
io.siesta.ReadXVFile: Reading ./surfGe.XV
Structures in fdf and XV are different! It has been relaxed?

Performing symmetry analysis
Traceback (most recent call last):
  File "/home/pedro/local/opt/inelastica/latest/python2.7/bin/Bandstructures", line 12, in <module>
    Module.main(options)
  File "/home/pedro/local/opt/inelastica/latest/python2.7/lib/python2.7/site-packages/Inelastica/SupercellPhonons.py", line 487, in main
    SCDM = Supercell_DynamicalMatrix(fdf, TSrun)
  File "/home/pedro/local/opt/inelastica/latest/python2.7/lib/python2.7/site-packages/Inelastica/SupercellPhonons.py", line 115, in __init__
    self.CheckSymmetries(TSrun=TSrun)
  File "/home/pedro/local/opt/inelastica/latest/python2.7/lib/python2.7/site-packages/Inelastica/SupercellPhonons.py", line 124, in CheckSymmetries
    Sym.setupGeom(self.geom.pbc, self.geom.snr, self.geom.anr, self.geom.xyz, onlyLatticeSym=True)
  File "/home/pedro/local/opt/inelastica/latest/python2.7/lib/python2.7/site-packages/Inelastica/Symmetry.py", line 81, in setupGeom
    self.findSymmetry(onlyLatticeSym)
  File "/home/pedro/local/opt/inelastica/latest/python2.7/lib/python2.7/site-packages/Inelastica/Symmetry.py", line 96, in findSymmetry
    self.findLattice()
  File "/home/pedro/local/opt/inelastica/latest/python2.7/lib/python2.7/site-packages/Inelastica/Symmetry.py", line 538, in findLattice
    a3 = possible[i3]
IndexError: index 115 is out of bounds for axis 0 with size 115

stderr to separate logfile

The stderr is currently being written to the beginning of the logfile (overwriting content). Would be better to have this as a separate output file (eg., .err).

Revision info to logfiles

In SVN the module IDs were printed to the logfile.

Can we get the git commit IDs printed in a similar way (i.e. automatically)? And/or release version?

Relax condition of atom ordering

Currently Inelastica expects the atoms to be ordered in the following blocks:

[buffer-left] (optional)
[electrode-left]
[device]
[electrode-right]
[buffer-right] (optional)

but such constraints are no longer present in transiesta. In a step towards full multiterminal compatibility we could first relax the above for the standard two-terminal setup.

Python 3 support

These things should be added

  • every file should start by from __future__ import print_function, division
  • fix all print ... calls to print(...)
  • change all classes to inherit object (the default behaviour in Py3)
  • Because of python installations with both Py2 and Py3 it may be important to move scripts (command line utilities) to module functions and use entry_points.

Using the examples of CO/Cu(111) for STMimage

Thank you very much for your reply,but I have a new question.
In the examples of CO/Cu(111), after running the command “STM -F 64 -L 87 -n 1 -x 5 -y 5 STM5x5”,I get the STMimage.nc file .
The version of Inelastica is 3.0, and transiesta is siesta-MAX-1.2.1.
I use the Mathematica notebook of AnalyzeSTMimage.nb to draw the STM images,but when I import the STMimage.nc file,there is no data,I don't khnow where the error is? Please help me to find out the error.
The output in Mathematica is shown as below.
STMimage
And I also upload the STM.txt file which is converted from the STMimage.nc file.
STM.txt
Thanks again!

XSF file displaying different lattice vectors from RUN.fdf ?

Good evening all
First of all happy holidays! As it is my first time let me introduce myself before addressing my issue:

My name is El-Abed Haidar. I am currently studying my PhD within the condensed matter theory group at the University of Sydney. I was wondering if anyone could answer me this insight question from Inelastica. The questions are as follow:
1- When using Eigenchannel utility, I noticed the MPSH states are given within an entire different unit cell from the input fdf file (RUN.fdf) I have introduced. It might sound a stupid question but could that software give an alternative unit cell than the one used in RUN.fdf?
attached here is the fdf file in word format.
RUNfdf file.docx

2- If not why was those parameters suggested in the VESTA figure below in the first place?
VESTA

3- In other words would the software Eigenchannel convert my RUN.fdf lattice vectors always into rectangular unit cells a b and c?

Thank you ! Looking forward to all comments and replies!
EL-abed

Python 3 installation support

Fix the setup.py script to enable Python 3 installation (that would immediately fix some of the issues related to travis).

Restructuring of code elements

I propose to reorganize the code into a structure like this

  • docs
  • Inelastica/scripts
  • Inelastica/IO
  • Inelastica/core
  • Inelastica/utils
  • Inelastica/F90
  • examples
  • tests

Fix broken function in SiestaIO

To avoid circular references, import Inelastica.MakeGeom was disabled in SiestaIO. Since it is needed in ReadANIFile this function is now left broken.

Using the examples of CO/Cu(111) for STMimage

Dear all,
I am experiencing an issue with the CO/Cu(111) examples. Specifically, after executing the command "STM -F 64 -L 87 -n 1 -x 1 -y 1 STM1x1", the calculation seems to get stuck at the ''Mode propagation starts'' stage and does not proceed any further. I have not received any error messages or warnings.
Could you please advise me on what steps I can take to resolve this issue?
Thank you very much! I am looking forward to your reply.
stm

local heating in Inelastica

dear developments and users

I used Inelastica, the python tool of siesta/transiesta, to calculate local heating in molecular junction. After running Inelastica, there are some information about heating for a certain phonon mode, such as " heating 2.934396e+10 (1/(sV))".

My question is what the value and the unit mean? For a bias voltage, for example 0.5V, what is the power of this phonon mode that transfers the energy into heat?

thanks in advance.

Device region in Inelastica

Respected all,

I have been running the Inelastica package @tfrederiksen (EigenChannels executable to be specific) as a post-processing tool for transport calculations after TranSIESTA. I used these and tried to reproduce some results about Benzenedithiol (BDT) from literature, which involved MPSH eigenstates visualisation.
The device region that I considered for the Inelastica run was only the molecular coordinates (in this case, 46-57; rest are gold electrode).

./EigenChannels -F 46 -L 57 -M 1.0 --bulk -f Transport_calc.fdf test_folder/

It gave error as follows:
Device atoms 46-57, orbitals 271-306
ERROR:
Too much overlap directly from left-top right
Make device region larger
Check against 'Device-Elec-overlap' failed...
Maximum value: 0.0289855647267
Error value : 1e-07
Traceback (most recent call last):
File "./EigenChannels", line 5, in
pkg_resources.run_script('Inelastica==0.0.0', 'EigenChannels')
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 540, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 1455, in run_script
execfile(script_filename, namespace, namespace)
File "/home/koushik/local/bin/lib64/python2.7/site-packages/Inelastica-0.0.0-py2.7-linux-x86_64.egg/EGG-INFO/scripts/EigenChannels", line 11, in
Module.main(options)
File "/home/koushik/local/bin/lib64/python2.7/site-packages/Inelastica-0.0.0-py2.7-linux-x86_64.egg/Inelastica/EigenChannels.py", line 151, in main
BufferAtoms=options.buffer)
File "/home/koushik/local/bin/lib64/python2.7/site-packages/Inelastica-0.0.0-py2.7-linux-x86_64.egg/Inelastica/NEGF.py", line 576, in init
"Make device region larger")
File "/home/koushik/local/bin/lib64/python2.7/site-packages/Inelastica-0.0.0-py2.7-linux-x86_64.egg/Inelastica/misc/valuecheck.py", line 100, in Check
raise ArithmeticError("Criteria not met. Please check output...")
ArithmeticError: Criteria not met. Please check output...

But if I take a single gold atom in the left, i.e. if the device region is taken as 45-57, then it is running as usual without any error.

Can you explain the error:
Too much overlap directly from left-top right
Make device region larger
Check against 'Device-Elec-overlap' failed...
Maximum value: 0.0289855647267
Error value : 1e-07

So, it would be a great help if any suggestions are made in this regard.

Regards,
Koushik R. Das

P.S.: the Inelastica package was installed without any apparent errors and all the dependencies were installed beforehand.

Sphinx indexing.

I've been struggling to get the 'Index' and 'Module index' at the documentation to be generated with sphinx... Any idea?

Pedro

Use the examples of AuH2

In the examples of AuH2/L9.68/TSrun, I run the command $EigenChannels ECrun, and I get a error:

SiestaIO.ReadTSHS: Reading TSHS header from ./Chain.TSHS
STOP Unsupported TSHS version file

So, what should I do to to solve this?

a few questions on "Phonons.py" run

I have a few questions regarding the use of inelastica for phonon and e-ph coupling calculations (I am using siesta-trunk-433 and the newest inelastica version that I cloned from github - let me know I should use a newer version of siesta):

(1) I recognize that in OSrun, for the AuH2 example given in the distribution of the code, the 6 structures are different only in x, y, and z coordinates for all the atoms (not only the FC active ones). What is the consideration behind this run? Why do we require multiple overlap matrices for the calculation of e-ph coupling? And do we always need these 6 structures with the above displacement pattern (with the corresponding MD.FCdispl) for every system?

(2) It looks like in the example, both TS.HS.Save and TS.SaveHS are set to true. What is the difference between the two keywords? Also, how many .TSHS files (and what are they, as I noticed there are many of these files generated) should be generated in the FCrun directory and what is the motivation behind that?

(3) Does inelastica generate the same vibrational frequencies as the vibrator utility shipped with the siesta distribution, found in Util/Vibra/Src/vibrator? I seem to find slight discrepancies. If there are indeed discrepancies, are they somehow related to the “eliminating interactions through PBCs along the z-direction”?

(4) Generally speaking, is it typically good enough to only include the molecular atoms in the FC runs? Or a few electrode atoms (such as an adatom) need to be included?

(5) If I want to use inelastica to calculate phonon properties of systems other than molecular junctions, how do I set the “device first”, “device last”, “PBC first”, and “PBC last”? Related to this question, in order to reduce computational cost, can I remove those “electrode atoms” (in transiesta sense) and do FCruns only for the device region (so that devicefirst=1 and devicelast=last atom in the coordinates) for a molecular junction? I thought if the device region is long enough, those electrode atoms outside the device region should hardly affect the phonon frequencies and e-ph couplings. Is this correct?

(6) In the output, there are a few files, such as output.mol.real-displ.asxf, output.mol.charlength-displ.asxf, etc, Could someone explain the meaning and the format (also units used) of each file?

(7) Does inelastica enforce the use of “Bohr” in all units (and the output files)? Or it will differentiate Angstrom and Bohr automatically based on the corresponding keywords in the .fdf? I guess it's the latter, but I just want to confirm.

A few other suggestions:

A) I think it's better to write in the instructions that different runs, such as FCrun, OSrun, etc. must reside in different directories starting with the name "FC", "OS", etc, and the “Phonons” run needs to be outside these directories. Also, the default file name is FCrun/RUN.fdf. I believe it will benefit the users if the author could explicitly list the required file names to run in each directory;

B) It would be helpful to tell the user up front that they should use transiesta instead of siesta to run the FCrun and OSrun (if this is correct), and the transiesta has better be compiled with NetCDF4 support;

C) In Phonons.py, the code can only read coordinates that are explicitly included in the RUN.fdf. If the coordinates are given by, e.g., %block .... < coordinate.file.name, then the inelastica does not work. I think this can be improved;

D) The setupOSrun only reads .XV files to generate the RUN_(1-6).fdf - if I do not start with a CG run (e.g., I get the coordinates from someone else), then I do not have the .XV file. I think the SetupOSrun should be able to figure out the coordinates based on the RUN.fdf in the FCrun, instead of relying on a .XV file from geometry optimization. In other words, I feel that the requirement for the file names and files present in each directory can be loosened a lit, to give the users more flexibilities.

Implement raise errors instead of sys.exit

Many places we use sys.exit(...) or simply kuk (the lazy, Swedish version) to abort execution.

Nick suggests that it is clearer to raise errors since Python scripts can then continue (if needed).

Phase information in EigenChannel scattering wavefunctions

Dear all,

Is there a way to visualize phase information of scattering wavefunctions using EigenChannel analysis? When I do EigenChannel analysis for a particular channel, I get "real", "imaginary", and "absolute" values of scattering wavefunctions in cube format. When I plot these using VESTA, I get "+ve" and "-ve" values of the wavefunctions (real, imaginary, or absolute), however, I do not get any phase information. Is there a way to find and visualize the phase of wavefunctions using these?

  • imaginary wavefunctions are very small compared to real (4 order of magnitude) in my case.
    Thanks,
    Anshu

Formatting of gh-pages

The documentation at https://tfrederiksen.github.io/inelastica/docs/latest/index.html (e.g.. firefox index.html) appear corrupted while the local copies (firefox local.html) are fine.

Bandstructures with --TSdir option fails if structure contains a smaller unit cell

I found that the Bandstructures script fails to compute the electronic bands if the system is actually a repetition of some smaller unit cell. For instance,

cd inelastica/TestCalculations/C-chains/A1/ELEC
Bandstructures --TSdir=. test
Bandstructures --TSdir=. -k test/symmetry-path test

fails in the last command with the following error:

ev[ispin], evec[ispin] = SLA.eigh(self.h0_k[ispin], self.s0_k)
ValueError: could not broadcast input array from shape (45) into shape (9)

because the system has been identified as a 5x1x1 repetition

Symmetry: Lattice structure
1 atoms in the basis
a1 = (1.300000,0.000000,0.000000), N1=5
a2 = (0.000000,6.500000,0.000000), N2=1
a3 = (0.000000,0.000000,6.500000), N3=1

Perhaps it would be useful if one in this situation could choose to do one of two things

  • ask for the bands corresponding to the smaller unit cell, or
  • compute the folded band structure for the repeated cell.

Release of version v1.2.0?

Let's provide a release "soon" in connection with this move from Sourceforge to GitHub. (We have v1.2-rc in setup.py).

We then progress here towards v1.3.0 with better documentation, new code structure, etc.

Deprecations and future problems

Currently one cannot compile Inelastica with newer versions of numpy.

  • numpy.complex is deprecated (to not overwrite default complex)
    Instead one should use numpy.complex_ if really needed
  • numpy.distutils will be removed in Python >= 3.12 releases, possibly one should move to scikit-build or something similar to account for these problems... :(

I am trying to do this in sisl. But are having some issues at the moment. Hopefully they should be fixed asap!

PyPi or Conda installations

Besides a description of the manual installation procedure it would be nice to provide easy installation via PyPi or Conda (as in sisl).

failure of installing Inelastica

The versions of packages are python 2.7, numpy-1.15.4, netCDF4-1.4.2, scipy-1.1.0, and Inelastica-1.3.5.

the install commands are as follows

python2.7 setup.py install --prefix=/work/phyjia/software/python2.7/
the output is as follows
out.log

Inelastica installation issue with python3

Good evening all,
I installed inelastica using python3 and it seems successful. I found two folders inelastica 1.3.6 and Inelastica.

I wanted to test it and I got the following error:
Problems encountered with F90helpers.so
Falling back on a pure python (slower) implementation
Try compiling manually following these steps:
$ cd Inelastica/fortran
$ source compile.bat (or compile_alternative.bat)
$ cp F90helpers.so /site-packages/Inelastica/fortran

So i did that and thought it would work but still got the same error.
Then i used: EigenChannels -M 1 FOLDER/ >update5.txt
to track every second within the txt file and I got the following:

Traceback (most recent call last):
File "/home/562/eh8122/.local/lib/python3.7/site-packages/inelastica-1.3.6/bin/EigenChannels", line 11, in
Module.main(options)
File "/home/562/eh8122/.local/lib/python3.7/site-packages/Inelastica/EigenChannels.py", line 135, in main
VC.OptionsCheck(options)
File "/home/562/eh8122/.local/lib/python3.7/site-packages/Inelastica/misc/valuecheck.py", line 217, in OptionsCheck
opts.buffer, L, R = SIO.GetBufferAtomsList(opts.TSHS, opts.fn)
File "/home/562/eh8122/.local/lib/python3.7/site-packages/Inelastica/io/siesta.py", line 1884, in GetBufferAtomsList
d = ReadTSHS(fn, nua=True)
File "/home/562/eh8122/.local/lib/python3.7/site-packages/Inelastica/io/siesta.py", line 1874, in ReadTSHS
nou, nos, nspin, nua, maxnh = F90.readtshs.read_size(fn)
NameError: name 'F90' is not defined

So I am not sure what went wrong and hope i could get assistance with such issue. Thank you and looking forward to your replies.
EL-abed

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.