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

list object from info goes to arrays if length of it = n_atoms #80

Open
stenczelt opened this issue Dec 17, 2019 · 2 comments
Open

list object from info goes to arrays if length of it = n_atoms #80

stenczelt opened this issue Dec 17, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@stenczelt
Copy link
Member

Let's assume we have atoms objects with lists/numpy-arrays in the info, like PCA coordinates for instance.
If the length of these properties are the same as the length of the atoms object (n_atoms) then they are moved to the Atoms.arrays of the atoms object on download instead the Atoms.info, hence the uploaded and downloaded xyz files differ.

This is especially bad if I have configurations with various number of atoms and a given length of list property in the info, like 10 PCA coordinates. Then the configs of length 10 will have it in their arrays and the rest in the info

@gabor1
Copy link
Contributor

gabor1 commented Feb 17, 2020

This is a tough one. We decided to use a single dictionary in abcd, but ase (and extended XYZ for readability) uses two kinds of dictionaries. How to convert between the two? IT must be heuristic. One option (but we should think through how much complexity this brings) is to have a helper object that remembers the source of the data when ASE or XYZ objects are uploaded to abcd, ie whether each piece of data came from arrays or info, and when we convert back, if this information exists, it is used for the conversion. if it doesn't, then we fall back onto the n=n_atoms heuristic.

@gabor1
Copy link
Contributor

gabor1 commented Jan 13, 2021

Check whether ASE_data_source mechanism is already implemented or not.

@gabor1 gabor1 added the enhancement New feature or request label Jan 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants