-
Notifications
You must be signed in to change notification settings - Fork 13
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
Implementation of EquivariantPowerSpectrum
and EquivariantPowerSpectrumByPair
convenience calculators
#317
Conversation
…rder_nu"` dimension in keys.
Here is a pre-built version of the code in this pull request: wheels.zip, you can install it locally by unzipping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only looked at naming! One other thing that we could do here would be SoapBiSpectrum
, for the invariant only-part
# ====================================================================== | ||
|
||
|
||
class LambdaSoap(TorchModule): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would prefer something like LambdaPowerSpectrum
/LambdaSoapPowerSpectrum
/EquivariantPowerSpectrum
/EquivariantSoapPowerSpectrum
I'm fighting against the SOAP == PowerSpectrum thinking, and making this explicit would help IMO
self, | ||
spherical_expansion_hypers: dict, | ||
atom_types: Optional[List[int]] = None, | ||
angular_cutoff: Optional[int] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really want this as a separate hyper for angular cutoff? Should we use the one from spx hypers instead?
spherical_expansion_hypers: dict, | ||
atom_types: Optional[List[int]] = None, | ||
angular_cutoff: Optional[int] = None, | ||
selected_keys: Optional[Labels] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be part of compute/forward
: different calls to the same calculator might request different keys
return lsoap | ||
|
||
|
||
class LambdaSoapXSphExByPair(TorchModule): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is \rho^2 x g_ij
, right? since g_ij
is SphericalExpansionByPair
, this should be BispectrumByPair
IMO (with potential Lambda
, Soap
, Equivariant
in there as well).
LambdaSoap
and LambdaSoapXSphExByPair
convenience calculatorsEquivariantPowerSpectrum
and EquivariantPowerSpectrumByPair
convenience calculators
Implements:
EquivariantPowerSpectrum
) calculator that wrapsDensityCorrelations
CorrelateTensorWithDensity
calculator that performs a single CG tensor product between a tensor of arbitrary body order and a density (body-order 2) tensor, where the samples between the tensor and density are different.EquivariantPowerSpectrumByPair
calculator, which generates aSphericalExpansion
andSphericalExpansionByPair
, manipulates the metadata appropriately, then usesCorrelateTensorWithDensity
calculator to performrho_i x g_ij
to generate an Equivariant power spectrum by pair📚 Documentation preview 📚: https://rascaline--317.org.readthedocs.build/en/317/