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

Potential Example #9

Merged
merged 49 commits into from
Sep 27, 2023
Merged

Potential Example #9

merged 49 commits into from
Sep 27, 2023

Conversation

cortner
Copy link
Member

@cortner cortner commented Sep 22, 2023

@CheukHinHoJerry
Copy link
Collaborator

CheukHinHoJerry commented Sep 22, 2023

@zhanglw0521 I think I am done from my end - maybe you can take care some parts as we discussed? We can talk about this more tmr.

cc @YangshuaiWang

And any objections on addingLuxCore as one of the dependencies? I need the AbstractExplicitLayer to implement some utility functions like concat_chain and append_layer but that is not in Lux.

@cortner
Copy link
Member Author

cortner commented Sep 23, 2023

I added an alternative implementation of append_layer named append_layers. It enforces giving layer names which I like to do anyhow. I find this a bit more elegant and one can append multiple layers at once.

model = append_layers(l_basis, 
                      get1 = WrappedFunction(t -> real.(t[1])), 
                      dot = LinearLayer(length(B), 1) )

@cortner
Copy link
Member Author

cortner commented Sep 23, 2023

LuxCore.jl can always be a dependency for everything. It's extremely lightweight and we need it everywhere.

@cortner
Copy link
Member Author

cortner commented Sep 23, 2023

I've now implemented forces and virials in a separate file forces.jl, I kept it separate only to not interfer with your changes. Feel free to incorporate this into what you are doing. Please don't yet delete forces.jl since I want to use it next to test out gradients w.r.t. parameters.

@cortner
Copy link
Member Author

cortner commented Sep 24, 2023

my last commit now adds an example for differentiating the total energy w.r.t. model parameters.

@cortner
Copy link
Member Author

cortner commented Sep 24, 2023

With this we can start doing parameter estimation on just energy

@zhanglw0521
Copy link
Collaborator

@zhanglw0521 -- some of the issues I raised over the past few hours probably shouldn't go into this PR but into a separate PR and the we rebase onto that, or merge it. Let's please not confuse too many issues into a single PR.

General rule is one PR per issue, unless of course there is a good reason to combine them.

I wouldn't think they should go in this PR or at least they should be done in other PRs that are based on this one. My last few commits just enabled the embedding of categorical basis onto the main chain.

@cortner
Copy link
Member Author

cortner commented Sep 25, 2023

I see lot's of great activity. Let's keep in mind that we are producing an example here. I will start a new repository where we build the actual interatomic potential models. Let's brainstorm a name on ZuLIP

I think a lot of what's being done here will move to that repo, and we can slim down the examples to something minimal.

@zhanglw0521
Copy link
Collaborator

@cortner @CheukHinHoJerry @YangshuaiWang

May I merge this PR to main first so that some other changes can be done based on this latest version? If everyone is ok with that, I will create another PR called "New_Potential_Example" or something like that, and future updates to this PR can go into that one.

@cortner
Copy link
Member Author

cortner commented Sep 27, 2023

yes please go ahead.

@zhanglw0521 zhanglw0521 merged commit b93cb35 into main Sep 27, 2023
2 checks passed
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.

4 participants