- #1
ChrisJ
- 70
- 3
I was not sure if this was the best place for this, it could fit here, in the Chemisty section or the Programming section. So feel free to move if needed.
Essentially I have been modeling polymers in python and using a Monte Carlo, Metropolis type algorithm, to minimise its energy into equilibrium from its intial state governed by a 3D random walk (not on a lattice).
I don't know why I am having so much trouble with this, probably because of different sources calling it different things, or using same notation but using it to refer to different bits. But anyway, all I am trying to do is to calculate the Radius of Gyration for my polymer once it has reached equilibrium.
I have tried to program these two equivalent expressions (below) for the radius of gyration, given in the same textbook, but a couple things confuse me which they don't explain.
##R_g^2 = \frac{1}{N+1} \sum_{i=0}^N \left < ( \textbf{r}_i - \textbf{r}_G )^2 \right > ##
where ## \textbf{r}_G ##, the centre of mass, is given by ## \textbf{r}_G = \frac{1}{N+1} \sum_{i=1}^N \textbf{r}_i ##
And also
##R_g^2 = \frac{1}{2(N+1)^2} \sum_{i,j=0}^N \left < ( \textbf{r}_i - \textbf{r}_j )^2 \right > ##
where the angle brackets represent averaging, but I am confused with what is being averaged? In the notation is is clear that ##R_g^2## is a scalar, but following the equation I end up with a vector still, so it must come out of the averaging,
but if one finds the difference between two vectors, you end up with a vector, if one squares a vector you end up with a vector, and then it asks to take the average... Is the radius of gyration only applicable to many instances of a polymer configuration. Like for example if one did 100 different configurations, then the radius of gyration is applicable to that set of 100 configurations, like with the rms distance in random walks?
I was told by my tutor to find the Radius of gyration of my system in equilibrium and plot vs N, yet it takes like 2-3 hours of the code running to get one polymer configuration from its starting point to equilibrium. So to get a decent set of configurations for N, and then do it x10 to get a plot vs N is going to take like a week of my computer @ 100% running code.
Any guidance on the Radius of Gyration is appreciated.
Essentially I have been modeling polymers in python and using a Monte Carlo, Metropolis type algorithm, to minimise its energy into equilibrium from its intial state governed by a 3D random walk (not on a lattice).
I don't know why I am having so much trouble with this, probably because of different sources calling it different things, or using same notation but using it to refer to different bits. But anyway, all I am trying to do is to calculate the Radius of Gyration for my polymer once it has reached equilibrium.
I have tried to program these two equivalent expressions (below) for the radius of gyration, given in the same textbook, but a couple things confuse me which they don't explain.
##R_g^2 = \frac{1}{N+1} \sum_{i=0}^N \left < ( \textbf{r}_i - \textbf{r}_G )^2 \right > ##
where ## \textbf{r}_G ##, the centre of mass, is given by ## \textbf{r}_G = \frac{1}{N+1} \sum_{i=1}^N \textbf{r}_i ##
And also
##R_g^2 = \frac{1}{2(N+1)^2} \sum_{i,j=0}^N \left < ( \textbf{r}_i - \textbf{r}_j )^2 \right > ##
where the angle brackets represent averaging, but I am confused with what is being averaged? In the notation is is clear that ##R_g^2## is a scalar, but following the equation I end up with a vector still, so it must come out of the averaging,
but if one finds the difference between two vectors, you end up with a vector, if one squares a vector you end up with a vector, and then it asks to take the average... Is the radius of gyration only applicable to many instances of a polymer configuration. Like for example if one did 100 different configurations, then the radius of gyration is applicable to that set of 100 configurations, like with the rms distance in random walks?
I was told by my tutor to find the Radius of gyration of my system in equilibrium and plot vs N, yet it takes like 2-3 hours of the code running to get one polymer configuration from its starting point to equilibrium. So to get a decent set of configurations for N, and then do it x10 to get a plot vs N is going to take like a week of my computer @ 100% running code.
Any guidance on the Radius of Gyration is appreciated.