Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't open attribute (can't locate attribute: 'l_max') when running timeSOAP.ipynb #84

Open
phys-chem opened this issue Oct 18, 2023 · 3 comments
Labels
question Further information is requested

Comments

@phys-chem
Copy link

Describe the bug
A clear and concise description of what the bug is.
KeyError Traceback (most recent call last)
/nfs/scistore14//timesoap/SOAPify/Examples/timeSOAP.ipynb Cell 7 line 2
24 slide = 1
26 return nAt, timedSOAP, np.diff(timedSOAP.T, axis=-1)
---> 29 nAtoms, tSOAP, dtSOAP = getTimeSOAP(soapFileName, trajAddress)

/nfs/scistore14//timesoap/SOAPify/Examples/timeSOAP.ipynb Cell 7 line 6
4 print(f)
5 ds = f[f"/SOAP/{trajAddress}"]
----> 6 fillSettings = getSOAPSettings(ds)
7 print(fillSettings)
8 print(ds.shape)

File ~/software/soapify/lib/python3.10/site-packages/SOAPify/utils.py:345, in getSOAPSettings(fitsetData)
328 """Gets the settings of the SOAP calculation
329
330 you can feed directly this output to :func:fillSOAPVectorFromdscribe
(...)
342
343 """
344 print(fitsetData)
--> 345 lmax = fitsetData.attrs["l_max"]
346 nmax = fitsetData.attrs["n_max"]
347 symbols, atomicSlices = getSlicesFromAttrs(fitsetData.attrs)
...
File h5py/_objects.pyx:55, in h5py._objects.with_phil.wrapper()

File h5py/h5a.pyx:80, in h5py.h5a.open()

KeyError: "Can't open attribute (can't locate attribute: 'l_max')"

Additional context
I use "wget https://github.com/GMPavanLab/dynNP/releases/download/V1.0-trajectories/ico309.hdf5" and put the data file in the same directory with "trajAddress = './' .

@Iximiel
Copy link
Collaborator

Iximiel commented Oct 18, 2023

Oh, that file was generated with an older version, without attributes, or with attributes with a different name,I don't remember well.

Without any context I can only guess that you are using the latest version of SOAPify.

To reproduce the calculations of that repository your environment should use the right requirements.txt (from v0.0.3, the version used for that paper, to v0.1 a lot of things have changed)

@Iximiel Iximiel added the question Further information is requested label Oct 18, 2023
@phys-chem
Copy link
Author

Oh, that file was generated with an older version, without attributes, or with attributes with a different name,I don't remember well.

Without any context I can only guess that you are using the latest version of SOAPify.

To reproduce the calculations of that repository your environment should use the right requirements.txt (from v0.0.3, the version used for that paper, to v0.1 a lot of things have changed)

Thank you for your help! I am using the latest version, is there an example for the latest version?

@Iximiel
Copy link
Collaborator

Iximiel commented Oct 18, 2023

Yes, look here, I hope this helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants