Dear Lammps developers,

In LAMMPS the basic lj unit setting saying the time scale is \tau=m\sigma^2/\epsilon. Then, m=sigma=epsilon=1.0. But I need to change the time scale to diffusion time scale, \tau=\sigma^2/D as in most overdamped simulations for active matter. How do I change it in LAMMPS in fix brownian without mistake, which cpp files has to changed ?

Best

Parvathy

You *do not* need to recompile anything for such a change. Choosing the appropriate `gamma_t`

setting in `fix brownian`

will change the effective diffusion coefficient.

To complete on @srtee remarks, the units on the one hand and the effect of the brownian damping constant on the other are two different things.

Questions regarding comprehension of lj units are common on the forum (see this thread for example), you can look up in the archive for more detailed discussions and physics textbooks/papers for common usages.

In the `units`

command manual page \tau is the **time unit** notation in reduced units. It is **not directly related** to the (1 dimensional) diffusion time scale youâ€™re **defining using the same symbol** which is a quantity you will get from your simulations. The former is just used as a unit for the latter.

However, as far as I understand what you try to achieve, nothing stops you from computing the said diffusion time scale (letâ€™s call it \xi) and to express your simulation time in reduced \xi units \tau'=\frac{\tau}{\xi} in a post-process from your results. This is unrelated to the units youâ€™re using. Again this is standard procedure youâ€™ll find in the relevant physics literature or explained by more skilled colleagues.

Thank you srtree. You meant to say that I donâ€™t need to change anything in the code and but include the correct parameter when I post-process the data ?

Thank you

Thank you Germain for the reply. Yes I agree with you that Diffusion co-efficient the one you measured from simulation. But if you scale \tau_0 based on the Diffusion co-efficient, that is the time scale you are set up for the simulations right ? So you meant to say that the actual simulation of LAMMPS, is good to go, because all of these values are set to one. when I post-process the data I have to divide the \tau (the original lammps time scale output time scale) with diffusion time scale (For example which might not be one.)? I agree that we can many scaling as we wish for energy as well as time. But it is confusing at times.

Parvathy

Think about ordinary life: if you choose to measure distance in meters and time in seconds, then your unit of speed will be in meters per second. If someone else chooses to measure distance in inches and time in minutes, then their unit of speed will be in inches per minute. But you can still clearly communicate with them as long as you know how to convert from meters to feet and back and from seconds to minutes and back.

As another example, very relevant to molecular dynamics: you can measure force in piconewtons, or in kilocalories per mole per angstrom. You can state any measured force in either unit as long as you know how to do the conversions (in this case it helps to start by stating one newton as one joule per meter).

It is exactly the same in unitless calculations: I guess a â€śdiffusion timescaleâ€ť set of units has a different time unit from the â€śLJ unitsâ€ť set by LAMMPSâ€™s `units lj`

, and you should calculate the conversion between â€śdiffusion timestepsâ€ť and â€śLJ timestepsâ€ť and then use it, just the same as you convert between seconds and minutes every day, bearing in mind that this will also induce conversions between derived units (just as different units for energy usually induce different units for force, like in the previous paragraph).

It will help you to go through this brief introduction to Reduced Units: Reduced units | Computer Simulation of Liquids | Oxford Academic

Thank you Srtee. â€śIt is exactly the same in unitless calculations: I guess a â€śdiffusion timescaleâ€ť set of units has a different time unit from the â€śLJ unitsâ€ť set by LAMMPSâ€™s `units lj`

, and you should calculate the conversion between â€śdiffusion timestepsâ€ť and â€śLJ timestepsâ€ť and then use itâ€ť. So the question is whether I have to do the conversion before doing the simulation? Since "LAMMPS lj " solves non-dimensionalised equation, is it okay to convert the time scale at the post-processing time (To diffusion time scale).