Coder Social home page Coder Social logo

Comments (6)

cestlavie06 avatar cestlavie06 commented on July 29, 2024 1

Okay the problem was either with my version of Python or atom (or both). I installed Anaconda and everything works perfectly now.

I wish I could tell you what happened when running that code, but I tried upgrading to a more recent version of Python before running it, which had its own series of issues. Installing Anaconda instead fixed everything.

Thank you so much for all your help and quick responses! This is an awesome package. I can't wait to use it.

from arc-alkali-rydberg-calculator.

nikolasibalic avatar nikolasibalic commented on July 29, 2024

Hi @cestlavie06 ,

Thank you for submitting the issue. This used to be the problem in ARC versions up to 2.0.3 when this was resolved. I did run the example code you provided without problems for n1=n2=109 and even higher with latest ARC version. If you are experiencing this issue, it means one of the two:

  • you don't have the latest ARC version (currently 2.0.11). In this case run pip install ARC-Alkali-Rydberg-Calculator --upgrade --no-cache-dir ; if you did had old version, you have to do the next step too. If you have new version but still experience problem then you need to do just the next step.
  • you are still using cached dipole matrix elements from the old version that had this problem. In this case please find in your home directory hidden directory called .arc-data. Under Linux/OSX it should be at ~/.arc-data, and for Windows you have to check maybe home or documents. You should delete this directory as it is used for caching the dipole matrix elements and persists even when you update ARC version. Please delete this folder before running program that uses ARC.

You should be able then to do calculation. Of course, new ARC version will upon first run create new .arc-data folder, that will be saving now d.m.e. calculated with new version of ARC.

Let me know if this resolves this issue.

from arc-alkali-rydberg-calculator.

cestlavie06 avatar cestlavie06 commented on July 29, 2024

Unfortunately this does not resolve the issue. I also tried uninstalling and reinstalling ARC 2.0.11 (via pip), deleting the .arc-data folder, and then running the code above, but it still fails for n>108. Is there another cache somewhere that might be causing the issue?

Thank you so much for your help.

from arc-alkali-rydberg-calculator.

nikolasibalic avatar nikolasibalic commented on July 29, 2024

Is there another cache somewhere that might be causing the issue?

The only cache is in your home root directory under hidden folder .arc-data

This sounds like some OS/Python specific issue. Can you please provide me the following information:

  • What is the operating system and what Python version are you using?
  • Can you send me the output you get when the code fails (stack trace/errors in output)?
  • Do you use arc in Spyder environment or similar? If so could you try running same code in plain python, just calling python yourcode.py in terminal? Sometimes environment (particularly Spyder) prevents arc from running properly.

Finally, in the meantime while I search for root cause, you can run quick calculations on Binder instance.

from arc-alkali-rydberg-calculator.

cestlavie06 avatar cestlavie06 commented on July 29, 2024

I'm using Windows 10.0 and Python 3.6.5.
I use atom to compile, and it gives no errors--it just has no output.
I've also just run it in the Python IDLE module and the shell just crashes. (See attached picture.)
ARCscreenshot
(The same crash occurs running it through the command prompt.)
Thank you. I really appreciate your help.

from arc-alkali-rydberg-calculator.

nikolasibalic avatar nikolasibalic commented on July 29, 2024

I am suspecting now that maybe C part of the application is not compiled correctly for your platform, causing ARC to crash whenever it tries to calculate non-cached values of d.m.e. However, I don't see errors in build log. Also it's not usual not to output errors.

  • To check this could you please try running the following code:
from arc import *

atom=Rubidium()
l = 0          # S state
j = 0.5        # J = 1/2

plotLegend = []
n = 60
step = 0.001
a1,b1 = atom.radialWavefunction(l,0.5,j,\
                                       atom.getEnergy(n, l, j)/27.211,\
                                       atom.alphaC**(1/3.0),\
                                       2.0*n*(n+15.0), step)
legendInfo, = plt.plot(a1,(b1)*(b1),\
                           "-",lw=2,color = "r", label = ("n = %d" % n) )
plotLegend.append(legendInfo)

plt.legend(handles=plotLegend)
plt.xlabel(r"Distance from nucleus $r$ ($a_0$)")
plt.ylabel(r"$\vert rR(r)\vert^2$")
plt.show()

If you can run and see the plot, than my hypothesis is wrong.

  • Which Python distribution are you using? Is it from Anaconda? It might be some dependancy problem if you use some other distribution. (I also install numpy, scipy and matplotlib using conda, i.e. conda install -c anaconda numpy). If you use different Python, it would be helpful if you can do installation of fresh Anaconda environment to see if the problem still occurs.

I hope we will locate problem with this info/testing.

from arc-alkali-rydberg-calculator.

Related Issues (20)

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.