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

First Prototype of this package #1

Merged
merged 15 commits into from
Aug 24, 2023
Merged

First Prototype of this package #1

merged 15 commits into from
Aug 24, 2023

Conversation

zhanglw0521
Copy link
Collaborator

This PR aims to create a first prototype (a lux chain actually) that maps a configuration ${x_i}_i$ to the corresponding $\mathcal{B}$ basis $[B^0, B^1, ..., B^L]$.

Currently, the tests pass, but the structure is still a little bit off compared with what we want. Still working on it...

zhanglw0521 and others added 2 commits August 4, 2023 16:16
Still subject to minor structure modifications
Remove those tests with Julia nightly
@zhanglw0521
Copy link
Collaborator Author

zhanglw0521 commented Aug 4, 2023

The test passed well locally, but doesn't work here. This first error looks a little bit weird to me, which seems to indicate that RepLie has not yet been registered? Or is it just something wrong with my Project.toml?

@zhanglw0521
Copy link
Collaborator Author

zhanglw0521 commented Aug 5, 2023

All local tests passed.

This PR seems to have (almost) all functionalities that were shown on the very right part of the whiteboard yesterday. But it still cannot pass the tests on git(cf. the above comments).

@CheukHinHoJerry
Copy link
Collaborator

Seems that we don’t have a registry in CI test that contains RepLieGroups.jl ?

@cortner
Copy link
Member

cortner commented Aug 5, 2023

Don't worry about CI yet. I'll review asap.

@cortner
Copy link
Member

cortner commented Aug 5, 2023

Jerry - we might have posted at the same time. You are right we need to add the correct registry.

@cortner
Copy link
Member

cortner commented Aug 5, 2023

Would you Kind adding the fix?

@CheukHinHoJerry
Copy link
Collaborator

CheukHinHoJerry commented Aug 5, 2023

CI test for the code runs now but it seems that incorrect version of P4ML is used?

[ Info: Tesing L = 0 O(3) equivariance
Equivariance: Error During Test at /home/runner/work/EquivariantModels.jl/EquivariantModels.jl/test/test_equivariance.jl:27
  Test threw exception
  Expression: F(X)  F(QX)
  MethodError: no method matching _valtype(::Polynomials4ML.MonoBasis, ::Type{Float64})
  
  Closest candidates are:
    _valtype(::Polynomials4ML.AtomicOrbitalsRadials, ::Type{<:Real})
     @ Polynomials4ML ~/.julia/packages/Polynomials4ML/1YAOV/src/atomicorbitalsradials/atomicorbitalsradials.jl:27
    _valtype(::Polynomials4ML.OrthPolyBasis1D3T{T1}, ::Type{T2}) where {T1, T2}
     @ Polynomials4ML ~/.julia/packages/Polynomials4ML/1YAOV/src/orthopolybasis.jl:41
    _valtype(::Polynomials4ML.STO_NG, ::Type{<:Real})
     @ Polynomials4ML ~/.julia/packages/Polynomials4ML/1YAOV/src/atomicorbitalsradials/sto_ng.jl:11
    ...

Also, do we want to add tests for HyperDuals too?

@zhanglw0521
Copy link
Collaborator Author

zhanglw0521 commented Aug 5, 2023

CI test for the code runs now but it seems that incorrect version of P4ML is used?

Thank you! I used [email protected]. But maybe I should adapt to the latest rather than make the code adapt to my environment.

@CheukHinHoJerry
Copy link
Collaborator

CheukHinHoJerry commented Aug 5, 2023

Thank you. And also I suggest to run the tests with julia >= 1.9.2 locally since there were some issue with version less than that before.

@zhanglw0521
Copy link
Collaborator Author

zhanglw0521 commented Aug 5, 2023

I am trying to adapt this PR to the latest version of P4ML. But I am not sure whether or not there is an issue with P4ML @0.2.2:

When I try

using Polynomials4ML: _valtype
totdeg = 4
Rn = legendre_basis(totdeg)
_valtype(Rn,Float64)

it works well and returns Float64, but when I try

Rn = MonoBasis(totdeg)
_valtype(Rn,Float64)

_valtype has no definition of this kind of operation.

Maybe adding

_valtype(b::MonoBasis, T::Type) = T

to P4ML would resolve this?

@CheukHinHoJerry
Copy link
Collaborator

CheukHinHoJerry commented Aug 5, 2023

Yes I think this is a bug in P4ML. I will create a PR on that side to fix this.

@cortner
Copy link
Member

cortner commented Aug 5, 2023

Testing with duals and hyperduals is useful but not urgent. Maybe an issue?

@CheukHinHoJerry
Copy link
Collaborator

bump

@cortner cortner merged commit d077e01 into main Aug 24, 2023
2 checks passed
@cortner cortner deleted the WIP_First_Prototype branch August 24, 2023 22:25
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