LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Accessing etotal compute
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Accessing etotal compute


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Sun, 2 Jul 2017 23:44:52 -0400

On Sun, Jul 2, 2017 at 11:32 PM, ankur agrawal
<ankur.agrawal1103@...24...> wrote:
> Hi
> Thanks for the reply. But as I mentioned in my mail, I had tried the exact
> same thing. Storing of the sum of 2 energies in a variable. But lammps
> discards it as illegal variable command.

you have to study the documentation more carefully. if LAMMPS issues
an "illegal variable command" error, then you command is incorrect.
also, you don't have to do such a complex computation, because all
properties available for thermo_style custom are also available to
equal style variables.

axel.

>
> Yours Sincerely
> Ankur Agrawal
> FourthYear Dual Degree Student
> Department of Chemical Engineering
> Indian Institute of Technology, kanpur, India
>
> Mobile-7753058907
> Alternate Email:ankurag@...71...
>
>
> On Sun, Jul 2, 2017 at 11:24 PM, sanat tiwari <sanatkrtiwari86@...24...>
> wrote:
>>
>> Hi Ankur,
>>
>> I think you can use two different computes for "ke" and "pe" and then if
>> you sum them, you should get the total energy. You can match it with
>> "etotal" output in the  output logfile.
>>
>> compute ake all ke
>> compute ape all pe
>>
>> variable equal c_ake+c_ape
>>
>> Thanks,
>> Sanat
>>
>> ----------------------------------------------------
>> Sanat Kumar Tiwari
>> Department of Physics and Astronomy
>> University of Iowa
>>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> lammps-users mailing list
> lammps-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lammps-users
>



-- 
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.