-
Notifications
You must be signed in to change notification settings - Fork 16
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
Interface and Docs Updates for v0.4.x #107
Conversation
Apologies for the delay in pursuing this. It is a lot more complex than I expected and I just didn't have the time. I will try to get as far as possible and ask individuals to contribute. |
Reporting some issues that need to be resolved:
|
This is worth a first look. In my view it is very close to being mergeable if we accept that some bugs will likely remain and can be fixed over time. |
Question: Should |
Note, I've removed the following from the tutorial: Some property names are reserved and should be considered by all libraries
I see no justification for this, especially the multiplicity which is highly application specific. In addition hiding comments like this at the end of a tutorial is not great. Instead, I started a list of potential future interface functions in |
Thanks Christoph. I'll take a more detailed look today or tomorrow. To answer your question from my point of view:
This is something I am very unsure about. In the subfield of molecular electronic structure theory, having a total charge and multiplicity on the system (rather than on the atoms) is standard across all codes I know (Gaussian, Orca, Q-Chem, Psi-k, pyscf, ...). This is probably not directly the community we target, but if we want to make it easy to them to integrate with us (or we want to integrate with them) than having this standardised is important. |
Then it could become part of the reserved function names for the extended interface. There are a million standards in different different fields and I don't see how we can honour them all. But we can try to agree on such a list. |
How about creating a list of recommended names for extended properties in the documentation? (Also intended to discuss future extensions of the interface) Maybe ordered by fields. Then the example can come back into the docs as an example. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Broadly looks good, but I'm not sure about the need for the second SystemWithCell
abstract type. Couldn't we just require a cell for all systems, or have an open cell default? Alternatively, if it needs to be in the type domain, we could have a second Bool
type parameter to AbstractSystem
.
I am ok with that but thought it would be easier for adoption to not require it.
Well, I think PeriodicCell should be default :) |
Either default is fine for me. |
Maybe something to point out regarding JG's comments about cells : despite my reservation about adoption I think he is fundamentally correct. Eg a neighbourlist should be a function of the list of positions and the cell. There is a lot of additional information that could be stored in such a cell object - eg reflections, a continuum exterior, etc ... I also feel that periodicity and bounding box are quite specific to periodic cells. The question for me is really about making one large redesign or a few smaller steps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also not too sure about SystemWithCell
. Otherwise looks generally ok on my end.
Agree.
This has been done for convenience. I think indeed we should move them to AtomsBuilder now (or replace them by something better ... ) |
I don't remember exactly, but perhaps the idea was to make it possible to easily extract the species type type argument from an AbstractSystem in a generic way. In my code bases it's used nowhere (ExtXYZ, AtomsIO, ASEconvert, AtomsView). Not sure about others, but probably it's better to remove it and only add it back once we need it in the future. |
Thank you @mfherbst and @jgreener64 for the feedback. Before proceeding with corrections, there is one big decision to make: should the reorganization of the interface into a "Core" package (whatever the name) and revisiting "AtomsBase" as an implementation of the interface and some tooling around it be done now for 0.4 or can we postpone the reorganization to a 0.5 (after more discussion) Personally, I would prefer to make 0.4 only about the new interface and reorganize later. But we can of course discuss. |
I'm ok with that, but if we want to pursue this reorganisation in the future, I would keep exporting the implementation for 0.4 (as mentioned in #106 I think it simplifies version transitions) |
Yes, that makes sense. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a few small suggestions here. I also don't like adding the SystemWithCell
thing, though I do think that opening up to different types of cells could be useful and definitely agree with Christoph's notion of separation (but fundamental interdependence) between coordinates and the cell they're in – as an example, one could also imagine extending this to other coordinate systems (cylindrical, spherical, ...) at some point. Personally, I think every system should have to have a cell anyway so the SystemWithCell
thing adds to the namespace without adding much helpful abstraction or functionality.
So my take-away (and this was my next question) is that all three of you prefer to enforce usage of a cell object. This means that Regarding naming:
I am ok with this. Just to confirm: Do you all agree with this? |
Something like this sounds good to me. |
Seconded! |
The latest commits make this ready for final review I think. Here are a few more comments:
|
@mfherbst -- sorry to bug you. I'm now only waiting for you 👍 to merge and register :) |
Coverage decreases quite a bit, which could mean we'll find bugs later, but not a blocker for me. |
Ready for review.
The following functions are now exported:
export bounding_box, periodicity, cell, n_dimensions, species, position, velocity, element, element_symbol, atomic_mass, mass, atomic_number, atomic_symbol, atomkeys, hasatomkey, Atom, FlexibleSystem, FastSystem, isolated_system, periodic_system, PeriodicCell, IsolatedCell
Changes and amendments to the discussion in #106
particle_species
tospecies
which felt more consistent with the rest of the function names,position, mass, velocity
.cell
interface is now enforced rather than optional.