-
Notifications
You must be signed in to change notification settings - Fork 2
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
Indexing fixes, optimization, and etc. for graphgen
#91
base: main
Are you sure you want to change the base?
Conversation
Ok, so it went from N^2 scaling to linear one?
I softly suggested to remove commented out code, if you had wanted to keep it it would have been fine as well.
I never said it is terribly named. Asking it in this way is a bit of a rhetorical question. |
Again, every norm induces a metric, but not every metric induces a norm. Norms have distinct properties, such as translational invariance. Metrics are more general, and the use of But semantics aside, the function
whereas a norm would satisfy:
Naturally,
You find that by your own tests, it satisfies the properties of a norm. I truly don't understand your insistence on this, ultimately trivial, point, but if you insist on brick walling then feel free to change the name of the function to whatever you like. |
I don't define the standards for the code alone. All other comments were just comments of the kind "I would do it like this". If I see a function call I think that others also would make the same assumption, hence would get confused by the current naming. So let's just wait for the comment of @mscho527 and @lweisburn , perhaps I am wrong then it stays as it is. ¹ Reinforced by the fact that initially the argument type was declared as scalar floats. |
@ShaunWeatherly and @mcocdawc, it is a bit difficult for me to exactly follow everything since i) multiple issues are discussed at the same time and ii) from what I understand, is based off of what you discussed in-person between you two. Do you want to walk us through in-person? Perhaps during the subgroup tomorrow? |
A few quick fixes. Perhaps next time just send me a message on slack, @mcocdawc .
Incomplete Initialization
Frag_atom
, along with all of the additional attributes generated byautogen
and not generated bygraphgen
, are currently unused in the code. As per your insistence on removing "dead code", I excluded the initialization of these parameters, because it was, and is, unused. I don't see how this could be described as "incomplete initialization", but I'll just assume that you plan to make use of this attribute and I've added it back in at your request.Fails at Molecule
remove_nonnunique_frags
that messed up the indexing whenNatm
was very large. This led to a number of smaller issues, along with the issue you encountered of some center sites not being appended to the superset fragments. I've fixed the issue and everything seems to be working just fine on my end now, but let me know if you encounter any other abnormalities.Bad Scaling
graphgen
previously found the shortest paths from a center to all other atoms in the system. Obviousuly, finding the shortest path from all-to-all is non-trivial for graphs with 100s of nodes. The fix is straightforward: 1) exclude edges fromadjacency_graph
if they are below some threshold, and 2) only find the shortest path for neighboring atoms which have an edge weight above that threshold. I've implemented that fix and the threshold can be found asgraphgen.cutoff
.Misleading name and interface