add new API to library interface lammps_get_thermo(). include support in python wrapper, too.
This commit is contained in:
@ -39,6 +39,9 @@ print("Energy from equal-style variable =",eng)
|
||||
vy = lmp.extract_variable("vy","all",1)
|
||||
print("Velocity component from atom-style variable =",vy[1])
|
||||
|
||||
vol = lmp.get_thermo("vol")
|
||||
print("Volume from get_thermo = ",vol)
|
||||
|
||||
natoms = lmp.get_natoms()
|
||||
print("Natoms from get_natoms =",natoms)
|
||||
|
||||
|
||||
@ -248,6 +248,13 @@ class lammps(object):
|
||||
if value: value = str(value).encode()
|
||||
return self.lib.lammps_set_variable(self.lmp,name,str(value))
|
||||
|
||||
# return current value of thermo keyword
|
||||
|
||||
def get_thermo(self,name):
|
||||
if name: name = name.encode()
|
||||
self.lib.lammps_get_thermo.restype = c_double
|
||||
return self.lib.lammps_get_thermo(self.lmp,name)
|
||||
|
||||
# return total number of atoms in system
|
||||
|
||||
def get_natoms(self):
|
||||
|
||||
Reference in New Issue
Block a user