Skip to content

Wrong unit of default b_tau in npt_langevin_init #453

@chlwjd1234

Description

@chlwjd1234

In torch_sim.integrators.npt.npt_langevin_init, the default value of b_tau is currently defined as

if b_tau is None:
    b_tau = 1 / (1000 * dt)  # Default barostat time constant

However, b_tau is later used to construct the barostat mass as:

cell_masses = (n_atoms_per_system + 1) * batch_kT * b_tau * b_tau

Since cell_masses should be in dimension of (energy) · (time)² ,
it should be changed as

b_tau = 1000 * dt

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions