I am using BIOVIA Materials Studio (Forcite MD) to analyze a vapor/liquid system, where the liquid layer is in the middle of the cell. I want to calculate a density profile along the z-axis using the Concentration profiles in Forcite --> analysis. However, the liquid layer is moved along z-axis during MD runs, so the concentration cannot be calculated correctly. My question is how to remove such an unwanted translational motion of the cell? so that the z-directed concentration profile could be calculated correctly? If there is any script for such a problem, I would like to have a copy. Your help is highly appreciated. Thank you very much.
Attached is a snapshot of the trajectory at t= 0 and at t=5 ns.

Hi,
As you alluded to, the “unwanted translational motion” is a result of your system evolving, collectively, during the MD simulation. From your description, it appears you are desiring a fixed point of reference for your density profile. In such case, you can make one of your molecules/important atoms fixed during the MD simulation, preferably at the "bottom" of your liquid layer, so that the liquid layer will remain in place overall, while still allowing the system to evolve.
Hope that helps,
Jian-jie
Could you please zip the complete folder of the run and post it to check if the center of mass of the complete system moved or just that of the liquid layer because on molecule moved in the gas phase.
Please also add the .xsd file from which the dynamics run was started.
Hi smile wang, Yes I see what you mean. One thought I have is to create a centroid on all the molecules in the layer and plot its Z coordinate vs time. It would be nice to shift the Z coordinate of the centroid to the center of the box (FractionalZ = 0.5) for each frame in the trajectory. How many frames do you have? It might be best to do that by script, as you suggested, if it is large. Or you could do the shifting on the density profiles for each frame, but it is a lot of data to manage. The Translate function is what you would apply to the centroid to make the shift for each frame. Something like this: $centroid->Translate(Point(Z=>-4)) would shift it by 4 Angstrom in the negative direction.
Thank you all very much for the suggestions. I agree that the z-translation would be inhibated by fixing a few molecules. However, this may cause some artifacts. I am not sure that if the mass-weighted centroid or the geometrical centroid should be removed from each frame. I am attaching the outputs in the test.zip file. I have tried to use the "Density profile.pl" to calcuate the mass density as a function of bins along z-axis. It produced wrongfully the profile because the unwanted move of the liquid and gas phases along z-axis. The correct way is to eliminate the z-move with respect to the first frame. A script is of course desired in view of the large size of the trajectory. Your help is greatly appreciated. PS. It appears that I cannot use Reply to make response to the help. I clicked on Reply but nothing happened. Sorry for any inconvinence.
I am not sure if we already asked this:
* What do you do with the results you get?
* What will they be used for?
Thank you, Jason, As you may see, the profiles shift always along the z-axis. How to get rid of such an unwanted shift so that the liquid and vapor densities could be calculated correctly on the basis of the time-averaged profiles?
Thank you Carsten, I want to remove the overall shifts of the molecules along the z-axis in the trajectory. I want to calculate the density of the vapor and liquid phases on the basis of the concentration profiles along the z-axis. Hopefully, the liquid phase is fixed at the middle of the cell and the gaseous molecules move around the slab, andthe interface changes more or less with time.
* What do you want to do with those densities afterwards?
* What will they be used for?
Hi, Carsten, once the densities for both liquid and vapor are obtained at fixed temperatures, the vapor-liquid coexistence curve is constructed so that the critical parameters (e.g., Tc) could be obtained afterwards.