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

Graphene now inherits from Molecule #93

Merged
merged 2 commits into from
Nov 14, 2023

Conversation

chrisjonesBSU
Copy link
Member

Given some discussion with @marjanAlbouye about how to best design a surface wetting module, one of the first to-dos was making it so that the surfaces in flowermd.library.surfaces inherit from flowermd.base.Molecule. This PR makes this change.

Here is an example of how we can create a graphene surface and apply a forcefield:

from flowermd.library import Graphene
from flowermd.library import OPLS_AA
from gmso.external import to_hoomd_snapshot, to_hoomd_forcefield

graphene = Graphene(
    x_repeat=4,
    y_repeat=4,
    n_layers=2,
    force_field=OPLS_AA()
)

graphene_snap = to_hoomd_snapshot(graphene.gmso_molecule)[0]
graph_ff = to_hoomd_forcefield(graphene.gmso_molecule, r_cut=2.5)[0]

This was the first step needed in order for the design choices we discussed in a class that combines a surface with a droplet GSD file.

@chrisjonesBSU chrisjonesBSU added the new module PRs that contribute to creating new flowermd modules. label Nov 14, 2023
Copy link
Collaborator

@marjanalbooyeh marjanalbooyeh left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks Chris!

@chrisjonesBSU chrisjonesBSU merged commit 4bf2472 into cmelab:surface-wetting Nov 14, 2023
1 check passed
@chrisjonesBSU chrisjonesBSU deleted the fix-surface branch November 14, 2023 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new module PRs that contribute to creating new flowermd modules.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants