-
Notifications
You must be signed in to change notification settings - Fork 19
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
Saving the LJ forcefield in numpy format with generateLJFF.py raises error #53
Comments
Okay, saving the atomic positions makes sense, and I guess the variable Could that be forwarded to save_vec_field instead of |
If we are changing np.savez(f'{fname}.npz', FFx=FF[:,:,:,0], FFy=FF[:,:,:,1], FFz=FF[:,:,:,2], lvec=lvec) It would make less files, probably faster IO, and you could also add the atoms information as an additional array. |
I would use it also for
|
I'm starting to think that using the ASE |
@NikoOinonen - good option; still we should save the object in between the cases if you run it through the scripts and using the |
Update the npy part of gpahene-spline test. is not working, because of this. (The whole test is not working at all ... but that is for a different issue) |
We've just experienced that bug as well. Can this be fixed anytime soon? Is any help needed here? |
This goes much deeper than I expected: If we are running XSF then the |
@LauriKurki and @yakutovicha :
so in the begging you have |
Ok, so we are switching to the NPZ format here: https://numpy.org/doc/stable/reference/generated/numpy.savez.html |
While trying to do relaxed scans with PPSTM, I found that generating the LJ forcefield with
python generateLJFF.py -i INPUT_FILE.xyz -f npy
seems to be broken at the moment in the main branch, as there is anIndexError: string index out of range
raised by line 390 in the attached snippet .https://github.com/Probe-Particle/ProbeParticleModel/blob/34e6a3603bfe4759fa68a0641ae202c30f64e778/pyProbeParticle/GridUtils.py#L382-L390
This happens because
head
is a string here, looks like something is wrong either in the indexing or the definition ofhead
? Ultimately the variablehead
is defined here asatomstring
:https://github.com/Probe-Particle/ProbeParticleModel/blob/34e6a3603bfe4759fa68a0641ae202c30f64e778/pyProbeParticle/HighLevel.py#L150
So the question is: does this function work properly or is there something wrong in the atom-writing function in GridUtils.py?
PS. This feature of saving atoms was not implemented in the old main branch of ProbeParticleModel and generating the force field using the
master_backup
branch works fine.Best,
Lauri
The text was updated successfully, but these errors were encountered: