Intro to Molecular Dynamics: Coding MD From Scratch

  Рет қаралды 11,745

Polymer Theory

Polymer Theory

Күн бұрын

Пікірлер: 38
@ChianugoOkeke
@ChianugoOkeke 2 ай бұрын
Great introduction and clarification on the roles that coding plays in MD simulations, Thanks!
@PolymerTheory
@PolymerTheory 2 ай бұрын
Glad it was helpful!
@niconeuman
@niconeuman 11 ай бұрын
Thank you very much! I started a python MD code from an older video that had no follow up and yours contains everything I need to follow! This is very useful for me! Thanks again!
@PolymerTheory
@PolymerTheory 11 ай бұрын
Very glad it was useful!
@PunmasterSTP
@PunmasterSTP 2 жыл бұрын
As far as tutorials go, this was incredible, and this video (and channel) deserves a much wider audience. Thanks for putting all this thought and effort into making it!
@PolymerTheory
@PolymerTheory 2 жыл бұрын
My pleasure! I know you like trying out simulation techniques - let me know if you play with the code :)
@PunmasterSTP
@PunmasterSTP 2 жыл бұрын
@@PolymerTheory I will for sure.
@uoy1997
@uoy1997 6 ай бұрын
Extremely high quality video. Great job!
@nothing_is_real_0000
@nothing_is_real_0000 Ай бұрын
Awesome tutorials! Very much helpful!! As you have rightly mentioned, this can be used/modified to explore different concepts, and best part all the code is accessible! Thanks so much and please keep them coming!!
@PolymerTheory
@PolymerTheory Ай бұрын
Very glad to be helpful! :)
@thehungmai686
@thehungmai686 2 жыл бұрын
A good video. I'm freshman at University. I'm so grateful video because It helped in my study. Thank you and hopefully that you will continue to launch video like this
@PolymerTheory
@PolymerTheory 2 жыл бұрын
I'm glad I could be helpful :)
@MCMC271
@MCMC271 10 ай бұрын
This is a very helpful video for understanding MD simulation from scratch, even with wonderful visualization! I would like to appreciate your efforts. I'd like add a minor comment that velocity rescaling is not a suitable method for maintaining the probability function of the canonical ensemble (NVT). To ensure the system follows the probability function of the canonical ensemble, one should use other thermostats like Langevin or Nose-Hoover thermostats.
@PolymerTheory
@PolymerTheory 10 ай бұрын
Thanks for the comment. You're right - I should have said that in the video. I just wanted to illustrate a simple example of a thermostat, but I didn't make it clear that this isn't a good one and doesn't give the correct distributions.
@SmittyBones
@SmittyBones 5 ай бұрын
Extremely helpful
@Rexd50
@Rexd50 7 ай бұрын
I have no idea how to do any of this math but I am very interested after watching this and attempting to work with NAMD and VMD
@PolymerTheory
@PolymerTheory 7 ай бұрын
I'm very glad to have inspired you! I hope it goes well 😊
@jorD6
@jorD6 20 күн бұрын
Excellent video!!, would you do a video about practical and fundamental books you recommend to learn about polymer simulation? Or recommend us (the noobs) books to begin in the topic. Thank you for the video 👌
@PolymerTheory
@PolymerTheory 20 күн бұрын
I'm glad you liked the video! I'll need to do a lot of preparation for a book review video and I can't promise to get around to it, but I can give some recommendations here. Some good books about the theory: Polymer Physics by Rubinstein and Colby Introduction to Polymer Physics by Doi Soft Matter: Polymer Melts and Mixtures by Gompper and Schick (I particularly like the section on self-consistent field theory) The Equilibrium Theory of Inhomogeneous by Fredrickson (More specifically about... what the title says... but it's very good for my area at least) But for simulations I'm not sure what to recommend. My approach has been more of a hodge-podge of learning from papers, people and software documentation. I know of some books that others recommend, but I have not read them myself so can't personally vouch for them. A couple of them are: Simulation Methods for Polymers by Kotelyanskii and Theodorou (The TOC looks promising and I know some of the people who wrote some chapters, and they are very good) Molecular Simulation Methods for Predicting Polymer Properties by Galiatsatos and Vassilios (Looks promising and chapters written by good people)
@jorD6
@jorD6 19 күн бұрын
@@PolymerTheory Thank you for the recommendations I really appreciate it, don´t worry about video with your answers and shared work is a lot, without a doubt hope to watch more of it and understand it more haha
@gabrielgoetten
@gabrielgoetten 2 жыл бұрын
Hi Russel, excellent video! Thank you for going into the basics, and the way you did is very unique. However I do have a question as to why not share the code? Are you afraid of someone stealing your original idea ?
@PolymerTheory
@PolymerTheory 2 жыл бұрын
Thanks! The basic ideas are not original and everything one needs to recreate the code is in the video so I'm not afraid of anyone stealing it. I'm just not really used to sharing code publicly so a bit insecure about putting it out there lol. But that's not a good reason so I'll go make it public. Disclaimer that I've put everywhere already: I have not checked it as carefully as I would if, for example, I was collecting data or trying to calculate precise values to publish, so watch out for bugs and/or edge cases.
@gabrielgoetten
@gabrielgoetten 2 жыл бұрын
​@@PolymerTheory Alright thanks for the explanation. I think those who will test it will probably use it as a study guide, and will follow your advise, so you do not need to worry....
@PolymerTheory
@PolymerTheory 2 жыл бұрын
@@gabrielgoetten Yeah, I think you're right. Just being paranoid.
@uoy1997
@uoy1997 6 ай бұрын
A few questions if you don't mind: When you mean a better numerical scheme, the verlet algorithm would be the standard choice am I correct? I've gotten into MD just this week hoping to use it to see the interaction between the anion and cation of an Ionic liquid, these are fairly complex molecules, do you think it's worth building an MD from scratch for this or would it be better to use GROMACS or LAMMPS? Especially if i'm only looking for a qualitative understanding and accuracy is not a priority
@PolymerTheory
@PolymerTheory 4 ай бұрын
The verlet algorithm is a good choice. It's a popular choice among the commercial MD simulators. Building your own MD code from scratch is a nice way to learn about MD and get a feel for how it works, but I would not recommend it as a practical method for getting a good MD simulator. Analogy: If you want to understand how cars work, building your own might be fun and informative, but it is not a practical way to get to the supermarket, especially if you can borrow someone else's car for free. I can't speak for you, but GROMACS and LAMMPS are faster, more bug-free, more capable, and generally better than anything I, personally, could write from scratch myself. You asked a month ago, and I only just noticed. I hope your MD journey is going well.
@bomcimtube
@bomcimtube 6 ай бұрын
Hello, what is the software do you use in your research to build and model polymeric systems?
@PolymerTheory
@PolymerTheory 6 ай бұрын
Hey. It depends what I'm doing. I mostly do SCFT calculations and I write my own code for that. I also do coarse grained particle simulations with my own code and other simulations with gromacs or lammps (not as common for me but good options if you want to get into particle simulations)
@ComputationalChem
@ComputationalChem 4 ай бұрын
Hello. May i ask a question? When you write formula gradPij=-24e[...]*(xij * x" yij * y" zij * z"] . xij means xij=( xi-xj ) etc. Will it be more right to use module xij=| xi-xj | ?
@PolymerTheory
@PolymerTheory 4 ай бұрын
If you replace xij with |xij| etc. the force always points in the same direction e.g. two interacting particles will have the same force vector on eachother, as opposed to equal and opposite forces. Assuming you mean the grad P equation at about 9:17.
@alreadyghosts7727
@alreadyghosts7727 2 жыл бұрын
Why is LJPot never used?
@PolymerTheory
@PolymerTheory 2 жыл бұрын
The code just simulates the dynamics, which only depends on equations of motion and thus derivatives of the potential, not the actual potential itself. If you want to calculate the internal energy then LJPot itself is required. The internal energy (and thus the actual potential) is required for a bunch of stuff you might want to know about the system, like the heat capacity or if you want to do thermodynamic integration or lots of other things. I wanted to include the function/subroutine but since the code just evolves the system in time, it's not useful to calculate LJPot for anything in the scope of the video.
@eskicia
@eskicia 4 ай бұрын
hiya, do you have any platform I can maybe contact you on? I am quite stuck on a project relating to MD for school
@PolymerTheory
@PolymerTheory 4 ай бұрын
Feel free to email me at the contact email given on my papers - I don't want to post my email address in a KZbin comment because it's more likely to be scraped and hence even more spam than usual.
@irisdejong6047
@irisdejong6047 8 ай бұрын
Where does reflectBC() go?
@PolymerTheory
@PolymerTheory 7 ай бұрын
It's easiest to put it right after the particle position is updated. In the example code, I put it at the end of the 'update' routine but it can also be after, depending how you implement it.
@GewoonFinn-
@GewoonFinn- 4 ай бұрын
I am working on this, however your NVE slide is a bit odd not well explained to my understanding, the pseudo code is not really understandable by me. lambda is defined two times different, besides if you start your simulation how do you choose KEold, you set it first equal to KEnew? Lambda might be very big at first, and how is now delta E defined? Probably it is determined by your starting velocity. And I guess starting with zero velocity is not the nicest thing to start with as dividing by zero is pretty unpleasant interesting stuff.
@PolymerTheory
@PolymerTheory 4 ай бұрын
Typically you start the simulation with a kinetic energy that reflects the temperature that you want it. This, combined with the potential energy defined by the distribution, gives the total energy of the system. E_old and E_new are just the energies before and after you update the kinetic energy, at any given step. Delta E is the difference between the energy of the system and what you want it to be. You can't change the potential energy without moving particles, but you can change the kinetic energy, so in practice it is the difference between the kinetic energy and what you want it to be. That changes at every step. I'm not sure I follow your questions so may not have answered them well.
Basics of Molecular Dynamics Simulations for Beginners
31:30
Mathieu Bauchy
Рет қаралды 99 М.
Molecular Dynamics Siumlations with Gromacs
53:28
Virtual Simulation Lab
Рет қаралды 65 М.
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
Симбочка Пимпочка
Рет қаралды 4,3 МЛН
路飞做的坏事被拆穿了 #路飞#海贼王
00:41
路飞与唐舞桐
Рет қаралды 25 МЛН
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 11 МЛН
Coding Adventure: Simulating Fluids
47:52
Sebastian Lague
Рет қаралды 1,9 МЛН
What is the i really doing in Schrödinger's equation?
25:06
Welch Labs
Рет қаралды 293 М.
Simulating Polymers: From Particles to Fields (More Math)
25:39
Polymer Theory
Рет қаралды 1,9 М.
10x Faster Than NumPy (GPU Magnet Simulation)
43:15
Mr. P Solver
Рет қаралды 15 М.
The Concept So Much of Modern Math is Built On | Compactness
20:47
Morphocular
Рет қаралды 443 М.
Fluid dynamics feels natural once you start with quantum mechanics
33:00
braintruffle
Рет қаралды 2,3 МЛН
GROMACS
57:37
SBGrid Consortium
Рет қаралды 27 М.
Molecular Simulations Part 1: Molecular Dynamics and Monte Carlo
33:56
Building a Physics Engine with C++ and Simulating Machines
11:23
AngeTheGreat
Рет қаралды 714 М.
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
Симбочка Пимпочка
Рет қаралды 4,3 МЛН