libAtoms / abcd

1 stars 4 forks source link

modifying data in existing configurations #18

Closed eszter137 closed 5 years ago

eszter137 commented 5 years ago

eg. when downloading a database, calculating new quantities for a subset (possibly chosen by another code with some sampling method) and uploading this subset again.

gabor1 commented 5 years ago

Yes, I see why you want to do this. Adam, should we generate an ID (e.g. as a truncated-accuracy hash of the atomic positions and the lattice) that we store as a derived type, and then an upload can be asked to recognise already existing configurations using this ID, and use a simple merge strategy (e.g. update (overwrite) data that already exists, add new fields, but do not delete fields that exist currently but are not in the new config. we can have a simple --overwrite flag which just kills the old config with the same ID. what do you think?

gabor1 commented 5 years ago

I'm not sure if it's a part of this issue, or separate, but in managing the data I think it will be quite common to want to add a key=value pair (the same one) to a bunch of configurations selected with a query. should this have a separate subcommand? like "abcd tag -q "formula~Fe" newkey=newvalue " or is there a better name ?

gabor1 commented 5 years ago

Similarly, we need to be able to delete, like: abcd delete -q

Do you think we should make this command return the count (or other summary) of the stuff to be deleted, and tell the user to add "-yes" to the command line to actually do the deletion, or is that only for babies ?

gabor1 commented 5 years ago

This issue is the same as modifying (updating) data in existing configs. clearly an autogenerated ID would aid this. when the data is simply a key=value pair, this is basically the same as tagging. we need to think more carefully about adding/removing array data. modifying the number of atoms is very thorny, and we should probably not allow it, and tell the user to delete the configuration and create a new one in that case.

gabor1 commented 5 years ago

I'm closing this, because it's accomplished using the exec subcommand now