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

Read parameters for VelocityBoltzmann from NQCDynamics.jl simulation. #9

Open
Alexsp32 opened this issue Nov 15, 2023 · 4 comments · Fixed by #11 · May be fixed by NQCD/NQCDynamics.jl#332
Open

Read parameters for VelocityBoltzmann from NQCDynamics.jl simulation. #9

Alexsp32 opened this issue Nov 15, 2023 · 4 comments · Fixed by #11 · May be fixed by NQCD/NQCDynamics.jl#332
Labels
enhancement New feature or request

Comments

@Alexsp32
Copy link
Member

With Julia 1.9 enabling package extensions, it should be possible to add extra methods to initialise a VelocityBoltzmann distribution using an NQCD simulation, e.g. VelocityBoltzmann(300u"K", simulation), using it to determine the atomic masses and total degrees of freedom to sample.

This would be useful in many cases where a DynamicalDistribution with a single Velocity Boltzmann distribution should affect all atoms in a system.

@Alexsp32 Alexsp32 added the enhancement New feature or request label Nov 15, 2023
@reinimaurer1
Copy link
Member

I don't quite understand this suggestion. VelocityBoltzmann can already deal with multidimensional systems (aribtrary ndofs and natoms). Are you suggesting that it automatically restricts the velocity distributions that are generated to a subset of atoms?

I am asking as I am currently working on that code.

@Alexsp32
Copy link
Member Author

My idea was to make generating a Boltzmann distribution more convenient when a NQCDynamics.Simulation is already initialised.
So instead of VelocityBoltzmann(T, sim.atoms.masses, size(sim)), enable VelocityBoltzmann(T, sim) to generate the same initial distribution.

@reinimaurer1
Copy link
Member

This makes sense. The solution I came up with is also not particularly nice. it works for now, but the interface could be easily improved.

@Alexsp32
Copy link
Member Author

Alexsp32 commented Feb 7, 2024

This needs to be implemented in NQCDynamics.jl unless we want to draw Simulations out into a separate package.

Would also be useful to account for frozen atoms in simulations automatically → Generate guaranteed 0 velocity distributions for those atoms instead of Boltzmann. #12 makes multiple types of distributions for a UnivariateArray possible, so this can be done automatically in NQCDynamics.jl or manually by starting with a Matrix{UnivariateDistribution}.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants