示例#1
0
文件: labels.py 项目: ziima/pyvmd
 def create(cls, *atoms):
     """
     Creates the label if it doesn't exist.
     """
     atomids = tuple(a.index for a in atoms)
     molids = tuple(a.molecule.molid for a in atoms)
     _label.add(cls._category, molids, atomids)
     return cls(*atoms)
示例#2
0
文件: labels.py 项目: lumik/pyvmd
 def create(cls, *atoms):
     """
     Creates the label if it doesn't exist.
     """
     atomids = tuple(a.index for a in atoms)
     molids = tuple(a.molecule.molid for a in atoms)
     _label.add(cls._category, molids, atomids)
     return cls(*atoms)
示例#3
0
    def update(self):
        """ Updates the values of the 'on' and 'value' attributes for this label.
		"""
        self.__dict__.update(label.add(self.type, self.molid, self.atomid))
示例#4
0
 def __init__(self, type, molid, atomid):
     self.type = type
     self.__dict__.update(label.add(self.type, molid, atomid))
示例#5
0
	def update(self):
		""" Updates the values of the 'on' and 'value' attributes for this label.
		"""
		self.__dict__.update(label.add(self.type, self.molid, self.atomid))
示例#6
0
	def __init__(self, type, molid, atomid):
		self.type = type
		self.__dict__.update(label.add(self.type, molid, atomid))