add emacs local variable tweaks and add some missing docstrings
This commit is contained in:
@ -52,3 +52,8 @@ def get_version_number():
|
||||
return t.tm_year*10000 + t.tm_mon*100 + t.tm_mday
|
||||
|
||||
__version__ = get_version_number()
|
||||
|
||||
# Local Variables:
|
||||
# fill-column: 100
|
||||
# python-indent-offset: 2
|
||||
# End:
|
||||
|
||||
@ -65,3 +65,8 @@ def get_ctypes_int(size):
|
||||
if size == 8:
|
||||
return c_int64
|
||||
return c_int
|
||||
|
||||
# Local Variables:
|
||||
# fill-column: 100
|
||||
# python-indent-offset: 2
|
||||
# End:
|
||||
|
||||
@ -37,6 +37,7 @@ from lammps.data import NeighList
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
class MPIAbortException(Exception):
|
||||
"""Exception to use when LAMMPS wants to call MPI_Abort()"""
|
||||
def __init__(self, message):
|
||||
self.message = message
|
||||
|
||||
@ -60,6 +61,7 @@ class ExceptionCheck:
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
class command_wrapper:
|
||||
"""Wrapper class to enable using 'lmp.xxx("args")' instead of 'lmp.command("xxx args")'"""
|
||||
def __init__(self, lmp):
|
||||
self.lmp = lmp
|
||||
self.auto_flush = False
|
||||
@ -1625,12 +1627,14 @@ class lammps:
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
def clearstep_compute(self):
|
||||
"""Call 'lammps_clearstep_compute()' from Python"""
|
||||
with ExceptionCheck(self):
|
||||
return self.lib.lammps_clearstep_compute(self.lmp)
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
def addstep_compute(self, nextstep):
|
||||
"""Call 'lammps_addstep_compute()' from Python"""
|
||||
with ExceptionCheck(self):
|
||||
nextstep = self.c_bigint(nextstep)
|
||||
return self.lib.lammps_addstep_compute(self.lmp, byref(nextstep))
|
||||
@ -1638,6 +1642,7 @@ class lammps:
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
def addstep_compute_all(self, nextstep):
|
||||
"""Call 'lammps_addstep_compute_all()' from Python"""
|
||||
with ExceptionCheck(self):
|
||||
nextstep = self.c_bigint(nextstep)
|
||||
return self.lib.lammps_addstep_compute_all(self.lmp, byref(nextstep))
|
||||
@ -2894,5 +2899,6 @@ class lammps:
|
||||
return idx
|
||||
|
||||
# Local Variables:
|
||||
# fill-column: 80
|
||||
# fill-column: 100
|
||||
# python-indent-offset: 2
|
||||
# End:
|
||||
|
||||
@ -91,3 +91,8 @@ class NeighList:
|
||||
return numneigh, neighbors
|
||||
|
||||
return -1, None
|
||||
|
||||
# Local Variables:
|
||||
# fill-column: 100
|
||||
# python-indent-offset: 2
|
||||
# End:
|
||||
|
||||
@ -231,3 +231,8 @@ class AvgChunkFile:
|
||||
|
||||
self.timesteps.append(timestep)
|
||||
self.total_count.append(total_count)
|
||||
|
||||
# Local Variables:
|
||||
# fill-column: 100
|
||||
# python-indent-offset: 2
|
||||
# End:
|
||||
|
||||
@ -526,3 +526,8 @@ class NumPyNeighList(NeighList):
|
||||
if idx == iatom:
|
||||
return neighbors
|
||||
return None
|
||||
|
||||
# Local Variables:
|
||||
# fill-column: 100
|
||||
# python-indent-offset: 2
|
||||
# End:
|
||||
|
||||
@ -1015,3 +1015,8 @@ class IPyLammps(PyLammps):
|
||||
"""
|
||||
from IPython.display import HTML
|
||||
return HTML("<video controls><source src=\"" + filename + "\"></video>")
|
||||
|
||||
# Local Variables:
|
||||
# fill-column: 100
|
||||
# python-indent-offset: 2
|
||||
# End:
|
||||
|
||||
Reference in New Issue
Block a user