I know I have to use compute msd and fix vector (or fix ave/time) but as for the main fix, which one should I use? I used fix npt and I got extremely high results. I used fix nvt and the msd didn't increase throughout. It would decrease at times.
You should also consider NVE. When a thermostat/barostat is involved in your simulations to control the temperature/pressure of your sample, it may artificially affect the dynamics of your molecule. I'd do first benchmarking to come to a better understanding of the results of each MD ensemble. In addition to the selection of MD ensemble, you should be careful with the relaxation parameters of thermostat/barostat, which may have substantial effects on your results.
Also, make sure that your sample is already well equilibrated before you start running production simulations.
Thanks Baris. I actually was doing in nve. However, my msd didn't show increase. Rather it was fluctuating. I had equilibrated my molecule for 1ns. I was trying to find out diffusitivity of methane in polyethylene.
I do not know the procedure you used to equilibrate your sample, but if you are satisfied with your sample is well equilibrated, we rule out this step. After this, it is also important that your results are statistically reliable. How many methane molecules have you got in your system? And how big your sample is?
In my system I have 10 methane molecules distributed randomly throughout. Then I minimized it using nve/limit and also equilibrated after the addition. My system is composed of 1806 atoms in which 600 atoms are carbon in a 25 angstrom box. There are 3 chains of 200 carbon atoms each. So the framework is crowded.
I computed msd for 3ns and I got the following graph attached. Can you tell if it is alright?
I can't tell you anything about your results are correct or not based on the graph you attached without seeing your data and input files. You should also visualize your sample to understand what is going on as you run your simulations.
Ten molecules may not be enough to get a smooth MSD curve. One thing you can do is to calculate the block averaged MSD curve from which you can get your diffusion coefficient.
I suppose that my reply is belated, but have to mention that in general simulations under constant pressure and temperature via NpT ensemble is more accurate/realistic. But! Some simulations cannot be done with it because of some restrictions connected to very small time/size-of-the-system-under-simulation intervals, and pressure/temperature dumping parameters as well, and probably because of the boundary conditions, especially in 2-d or quasi-2d structures.
On the other hand In the NPT ensemble, barostats dynamically adjust the volume of your simulation box to maintain a constant pressure. Consequently the particles therefore experience two displacements: first 1 is their ordinary motion due to collisions and interactions with neighbouring particles and on the other hand - a corrective displacement to maintain their relative position inside the simulation box when its volume is varied by the barostat and particle positions are re-scaled accordingly.
Again, from a physical point a view, you can use of course NVT and adjust the pressure "manually" via compute pressure or something similar, and NVE too, for very small systems, but prom practical point of view I've already mentioned -- NpT is more realistic/reliable.