Skip to content

Add enhanced-sampling submodule: metadynamics, boxed dynamics, and loxodynamics#581

Open
amateurcat wants to merge 5 commits into
TorchSim:mainfrom
amateurcat:enhanced-sampling
Open

Add enhanced-sampling submodule: metadynamics, boxed dynamics, and loxodynamics#581
amateurcat wants to merge 5 commits into
TorchSim:mainfrom
amateurcat:enhanced-sampling

Conversation

@amateurcat

Copy link
Copy Markdown

Adds a self-contained torch_sim.enhanced_sampling submodule of enhanced-sampling methods that compose with any MLIP via SumModel

add enhanced_sampling module, reconstruct meta-dynamics functions and moved them into the new module
implemented Boxed MD
add loxodynamics
Fix format with pinned ruff 0.15.4
@CompRhys CompRhys added the feature Entirely new features, not improvements to existing ones label Jun 26, 2026
return out.index_add(dim, system_idx, src)


class LogfermiWall(ModelInterface):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we append Model to the name here to name it clearer?

return {"energy": energy, "forces": forces, self.energy_label: energy}


class RMSDCV(ModelInterface):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we append Model to the name here to name it clearer?

raise ValueError(f"{self.activation=} must be one of {_ACTIVATIONS}")


class ShiftedSoftplus(nn.Module):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is there no common library that already defines this?



@dataclass
class DescriptorNormalizer:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

again do we need to implement this here rather than import a standard mean-variance normalizer?

@CompRhys

Copy link
Copy Markdown
Member

Thanks for the feature contribution! I gave it a quick glance today but will look in more details next week. Comments thus far are just nits not looking at the algorithms/test coverage yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Entirely new features, not improvements to existing ones

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants