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

Change nematic example to conform to new API for freud 3.0 #68

Merged
merged 28 commits into from
Feb 13, 2024

Conversation

DomFijan
Copy link
Contributor

@DomFijan DomFijan commented Apr 18, 2023

Description

Due to change in order.Nematic API the example requires changes. In addition many users were confused by the current example. The new example will greatly expand on theory behind the nematic order parameter and introduce an easy way to compute a smectic order parameter as well alongside with some useful references for further reading.

Resolves: #57 and glotzerlab/freud#945

Checklist:

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@tommy-waltmann tommy-waltmann mentioned this pull request Apr 21, 2023
4 tasks
@DomFijan DomFijan marked this pull request as ready for review April 27, 2023 19:27
@DomFijan DomFijan requested a review from a team as a code owner April 27, 2023 19:27
@DomFijan DomFijan requested review from yeinlim, tommy-waltmann and Lina492375qW1188 and removed request for a team April 27, 2023 19:27
@review-notebook-app
Copy link

review-notebook-app bot commented May 1, 2023

View / edit / reply to this conversation on ReviewNB

tommy-waltmann commented on 2023-05-01T12:30:48Z
----------------------------------------------------------------

This is a very wordy way of introducing what the nematic order parameter is. I would remove Eq. 1 and its description, since freud doesn't use it in evaluating the nematic order parameter. Start with some combination of Eqns. 3/4/5 (eq 2 is missing?) and before you even introduce those, say something more conceptual about what it does, why its useful, etc. The citations for the papers with all the complex math can stay, and just say something like "for a more in-depth theoretical treatment of the nematic order parameter, see ..."

In general, this first section needs to do more concept introduction and less mathematical word soup. This is the module introduction.


@review-notebook-app
Copy link

review-notebook-app bot commented May 1, 2023

View / edit / reply to this conversation on ReviewNB

tommy-waltmann commented on 2023-05-01T12:30:49Z
----------------------------------------------------------------

This paragraph doesn't need to talk about the changes that were made going from version 2 to version 3. Just state what freud needs to do that calculation.


@review-notebook-app
Copy link

review-notebook-app bot commented May 1, 2023

View / edit / reply to this conversation on ReviewNB

tommy-waltmann commented on 2023-05-01T12:30:50Z
----------------------------------------------------------------

Similar to what I mentioned above, there doesn't need to be a comment saying everything that has changed from v2 --> v3


@review-notebook-app
Copy link

review-notebook-app bot commented Sep 13, 2023

View / edit / reply to this conversation on ReviewNB

tommy-waltmann commented on 2023-09-13T16:10:24Z
----------------------------------------------------------------

Let's not encourage users to manually compute the nematic OP or nematic director, freud computes those and users can just access the property after calling compute.


@review-notebook-app
Copy link

review-notebook-app bot commented Sep 13, 2023

View / edit / reply to this conversation on ReviewNB

tommy-waltmann commented on 2023-09-13T16:10:26Z
----------------------------------------------------------------

It may be useful in a separate example, but I don't think a guide on how to compute smetic order parameters belongs in the module intro for the Nematic order parameter.


@review-notebook-app
Copy link

review-notebook-app bot commented Sep 25, 2023

View / edit / reply to this conversation on ReviewNB

tommy-waltmann commented on 2023-09-25T15:26:26Z
----------------------------------------------------------------

This title is what people will see as the title of the example as they look through the documentation. Let's name this "Calculating Smectic Order Parameters".

There are also lots of small grammatical things to fix throughout the entire example notebook.


@review-notebook-app
Copy link

review-notebook-app bot commented Sep 25, 2023

View / edit / reply to this conversation on ReviewNB

tommy-waltmann commented on 2023-09-25T15:26:27Z
----------------------------------------------------------------

Typically, we like to put all the helper functions used in an example in their own code block at the top of the example. For examples of this, have a look at the RDF example (here)[https://freud.readthedocs.io/en/latest/gettingstarted/examples/examples/Calculating%20RDF%20from%20GSD%20files.html], and other documentation examples.


@review-notebook-app
Copy link

review-notebook-app bot commented Sep 25, 2023

View / edit / reply to this conversation on ReviewNB

tommy-waltmann commented on 2023-09-25T15:26:28Z
----------------------------------------------------------------

Line #13.    director = nematic.director / np.linalg.norm(nematic.director)

Is the nematic director that freud gives not already normalized?


DomFijan commented on 2023-09-29T22:34:12Z
----------------------------------------------------------------

We don't normalize it explicitly anywhere.

@review-notebook-app
Copy link

review-notebook-app bot commented Sep 25, 2023

View / edit / reply to this conversation on ReviewNB

tommy-waltmann commented on 2023-09-25T15:26:29Z
----------------------------------------------------------------

This title should be changed now that smectic OPs are in a different example.


@review-notebook-app
Copy link

review-notebook-app bot commented Sep 25, 2023

View / edit / reply to this conversation on ReviewNB

tommy-waltmann commented on 2023-09-25T15:26:30Z
----------------------------------------------------------------

There are small grammatical issues in a few places still here, too. I can go through and make those changes.


Copy link
Contributor Author

We don't normalize it explicitly anywhere.


View entire conversation on ReviewNB

@DomFijan DomFijan requested review from tommy-waltmann and removed request for tommy-waltmann November 30, 2023 20:34
Copy link

review-notebook-app bot commented Jan 31, 2024

View / edit / reply to this conversation on ReviewNB

tommy-waltmann commented on 2024-01-31T22:20:05Z
----------------------------------------------------------------

I don't understand why the last sentence of this block was here. We don't need to refer people to an intro tutorial to calculating smectic order parameters if we are writing that tutorial.


@tommy-waltmann
Copy link
Contributor

@DomFijan I have gone through and re-worded the examples in this PR. Have another look over it and let me know if you have any further edits.

@DomFijan
Copy link
Contributor Author

DomFijan commented Feb 7, 2024

@tommy-waltmann
This is good. The tests are failing due to changes in gsd.open read/write modes in some other notebooks.

@DomFijan DomFijan requested a review from a team as a code owner February 12, 2024 17:58
@tommy-waltmann tommy-waltmann mentioned this pull request Feb 13, 2024
4 tasks
Copy link
Contributor

@tommy-waltmann tommy-waltmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tommy-waltmann tommy-waltmann merged commit 18c8489 into next Feb 13, 2024
2 of 4 checks passed
@tommy-waltmann tommy-waltmann deleted the example/nematic-new-api branch February 13, 2024 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants