## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
Guillaume Fraux
@Luthaf
Ok ! Yes, the configurational bias is really something we will want to have. Do you think a solution to your initial issue of getting the bias potential could be solved by adding an additional function to the Potential trait (or one of the sub-traits)?
Gernot Bauer
@g-bauer
The problem is generating a geometry (length, angle) according to the Boltzmann distribution of the underlying potential function (which can be significantly simplified for harmonic potentials). A naive implementation - what I should have started with - could simply run a small MC like simulation within the configurational bias part. This would work for every kind of potential and not just harmonic potentials, but can be very slow. But to answer your question, I think a function to extract the equilibrium value of a potential will be helpful.
Guillaume Fraux
@Luthaf
Would it be possible to generate the distribution around the equilibrium value by assuming an harmonic potential (a second order development of the potential), and then maybe unbias the generated states?
Also, do we also need the full distribution for rigid molecules ? This could start as rigid only for now, and be extenended to flexible molecules later. Bonds and angles should be fine most of the time in rigid molecules, dihedrals can be harder to reproduce.
Gernot Bauer
@g-bauer
No, for rigid bonds/angles there is no need to create a distribution. For a molecule of rigid bond lengths and angles, we would add a new position by choosing a random position on a cone around the currently last particle. The angle and length of the cone are fixed though.
If you want to dive into CBMC, this site is awesome.
Gernot Bauer
@g-bauer
In my current take, I decoupled all generations, i.e. first a length is created, then an angle given the length and then a dihedral given length and angle. Since length and angle are chosen according to their Boltzmann weight, the move is more likely to be accepted.
Guillaume Fraux
@Luthaf
Thanks for the link! I really need to take some time to understand CBMC =)
Marcio
@mgxm
Guillaume Fraux
@Luthaf
Yep, faster looks nice =)
But it is nightly only for now =/
Guillaume Fraux
@Luthaf
We could still give it a try to see what speed improvement we could get out of SIMD
Marcio
@mgxm
yes! :)
next year I can help
I'm glad that this year is ending haha
Gernot Bauer
@g-bauer
I played around with faster a bit but I found it rather hard to get thinks working. I think this will get better with the next release.
:smile:
Marcio
@mgxm
I haven't tested yet
which parts did you find hard?
Gernot Bauer
@g-bauer
I had trouble using some functions such as exp within maps but this could also be due to me not getting it right
I think it will get better when some documentation is added, thatâ€™s currently rather sparse.
I think I tried to implement a SIMD logsumexp version
Marcio
@mgxm
yep, let's wait for the next release and see;
Gernot Bauer
@g-bauer
@Luthaf I'll review open PRs within the next days.
Guillaume Fraux
@Luthaf
Ok! #225 is not critical, I still have work to do here. #230 contains some fixes for Ewald, but I first need to investigate the Travis failure.
And thank you for the time you spend doing with these review :smiley:
Xavier Linn
@xperrylinn
Hello everyone, my name is Xavier and I
'm new to project. Are the 4 open task in the easy issue still in need of some work?
Guillaume Fraux
@Luthaf
Welcome @xperrylinn ! Yes, all these issues still need some work!
If you pick one, I can give you specific instructions with respect to the changes to do.
Do you already have experience with Rust or with molecular simulation?
Gernot Bauer
@g-bauer
Hi xperrylinn! Nice to meet you!
Xavier Linn
@xperrylinn
@Luthaf new to Rust, but familiar with molecular simulation. I can start with the Morse potential in implementing the classical potentials issue.
@g-bauer greetings!
Guillaume Fraux
@Luthaf
This look like a nice idea! @g-bauer just wrote a tutorial for doing this: http://lumol.org/lumol/latest/book/advanced/potential/index.html
Gernot Bauer
@g-bauer
Hey, the Morse potential is already implemented (also as a first contribution). You can have a look at all implemented potentials here. If you need help, let us know!
Guillaume Fraux
@Luthaf
Whoops, sorry, I did not marked it as implemented on the issue. Should we also put the tutorial code in lumol-core and tick the corresponding box?
Gernot Bauer
@g-bauer
You mean the Mie potential? We can do that, although we (read: I) then should also write the rest of the tutorial about the necessary steps to make it work with the input system.
Ping @xperrylinn just in case you start working on Morse potential without seeing this.
Guillaume Fraux
@Luthaf
Yes, I was thinking of the Mie potential. Fair enough, we can put it in core when the tutorial is finished =)
Gernot Bauer
@g-bauer
@gjepson Let me know if you want to make your WCA implementation accessible from input files. I'd gladly help with that.
Gernot Bauer
@g-bauer
I just pushed my PR with the Mie potential implementation. Maybe you can use it as guide on where to add stuff for input file usage (see here)
Gernot Bauer
@g-bauer
@Luthaf I had some time to read the PR concerning the DOF. Having both MC and MD makes this issue a bit messy. I don't have a clear idea how to solve this. Do you have any (open) points you want to discuss?
Guillaume Fraux
@Luthaf
In my mind, this a way to compute the pressure correctly with both MD and MC
Which is why it covers both =)
It is still a WIP because I did not get the Ewald MC NPT tests to pass, but from what I remember this was working for NPT simulations of rigid molecules with MC.
I have a local branch covering more fixes to Ewald, but it is not there yet.
In the meantime, I'll be happy to discuss the solution / framework I used to get the number of simulated degrees of freedom from the propagator
I tried to get something that could be expanded to future use-cases, such as algorithms for rigid molecules MD (SHAKE, ...)
Let me know if the code is understandable, I'll be happy to add more documentation if this is needed