I am trying to calculate the Kinetic energy of the center of mass of a system. I looked at fix temp_com command and found that it subtracts the vel of center of mass (“vbias”) from each of the atoms. I want to know in which subroutine this “vbias” has been calculated.
If you're asking how to code it, there are methods in the Group class
that compute Vcm, for example.
If you want that value in an input script, there are variables that
return the velocity and mass of a group of atoms.
I am actually trying to use “fix ttm” command but instead of T_a (atomic temp) i want to use “temp/com” since my system has some non-zero motion of the center of mass. How can i change the source code to implement this?
Maybe Paul has a suggestion since he knows the fix ttm code.
Basically you have to invoke the compute temp/com the
same way thermostats do with the bias/unbias calls.
Fix ttm does not use a compute to get the atomic temperature. So to do what you want, you'd have to modify the fix ttm code. You'd need to either change the code to subtract out the c.o.m. motion (see lines 525 and 526 of fix_ttm.cpp), or you'd need to change the code to use a compute to get the atomic temperature and then invoke the needed compute command from the input script to remove the c.o.m. motion.
I had gone through the fix_ttm.cpp file. From what i have understood, the line 525 corresponds to output the atomic temp(T_a). To remove the COM velocity, i think i should change the following line 274.
flangevin[i] = gamma1v[i] + gamma2(random->uniform()-0.5);
Instead of " v[i]" in this line, i should replace it with " v[i]-vcm " .
Will that be enough or any further changes are required ?
Yes, looks like you’re on the right track. You’ll probably want to modify the code wherever the velocity appears (lines 270, 274-276, 396-397, 503). You’ll also need to make sure you compute vcm on the correct group of atoms in each case. Of course you’ll need to verify your code and answers. Good luck.
I am trying to understand the implementation of “ttm” . In the documentation section, it was mentioned that the langevin thermostat has been applied on atoms in each cell with the target temperature being the corresponding “electron temp”. I didnot understand the significance of doing this.
Say if we input T_e values much higher than the T_a, then the above statement implies that the thermostat increases the temperature of all atoms to that of T_e. But i had observed that this is not the case. The final eqbm temperature is same for both electron and atoms and it will be somewhere in between. Is it because of time and spatial derivative terms in the diffusion equation?
How good will this model be in systems with size less than the mean freepath of electrons?
D M Duffy and A M Rutherford, J. Phys.: Condens. Matter, 19, 016207-016218 (2007).
A M Rutherford and D M Duffy, J. Phys.: Condens. Matter, 19, 496201-496210 (2007).
C.L. Phillips, P.S. Crozier, “An energy*-conserving two-temperature model of radiation damage in single-component and binary Lennard-*Jones crystals,” J. Chem. Phys., 131, 074701 (2009).
Note that the input T_e values do not remain constant, but are coupled to the T_a values. As you’ve observed, the T_a and T_e values generally tend to approach each other as the system comes to thermal equilibrium. There are indeed temporal and spatial terms in the diffusion equation describing the energy flow in/out and through the electronic subsystem.
This model is particularly well suited for metals, and less so for semiconductors or insulators. See the above papers for more details.