예제 #1
0
파일: labels.py 프로젝트: ziima/pyvmd
def get_label_data(category, atomids, molids):
    """
    Utility function to get VMD data for label.
    """
    rev_atomids = atomids[::-1]
    rev_molids = molids[::-1]
    for hit in _label.listall(category):
        if hit['atomid'] == atomids and hit['molid'] == molids:
            # Found it, return data
            return hit
        # The lists of atomids and molids may be reversed
        elif hit['atomid'] == rev_atomids and hit['molid'] == rev_molids:
            # Found it, return data
            return hit
예제 #2
0
파일: labels.py 프로젝트: lumik/pyvmd
def get_label_data(category, atomids, molids):
    """
    Utility function to get VMD data for label.
    """
    rev_atomids = atomids[::-1]
    rev_molids = molids[::-1]
    for hit in _label.listall(category):
        if hit['atomid'] == atomids and hit['molid'] == molids:
            # Found it, return data
            return hit
        # The lists of atomids and molids may be reversed
        elif hit['atomid'] == rev_atomids and hit['molid'] == rev_molids:
            # Found it, return data
            return hit
예제 #3
0
파일: labels.py 프로젝트: ziima/pyvmd
 def __iter__(self):
     for label in _label.listall(self.category):
         yield self._label_cls(*(Atom(a, Molecule(m)) for a, m in zip(label['atomid'], label['molid'])))
예제 #4
0
파일: labels.py 프로젝트: ziima/pyvmd
 def __len__(self):
     return len(_label.listall(self.category))
예제 #5
0
def atomLabels():
    """ Returns a list of all existing atom labels."""
    return [
        apply(AtomLabel, d["molid"] + d["atomid"])
        for d in label.listall("Atoms")
    ]
예제 #6
0
def dihedralLabels():
    """ Returns a list of all existing dihedral labels."""
    return [
        apply(DihedralLabel, d["molid"] + d["atomid"])
        for d in label.listall("Dihedrals")
    ]
예제 #7
0
def angleLabels():
    """ Returns a list of all existing angle labels."""
    return [
        apply(AngleLabel, d["molid"] + d["atomid"])
        for d in label.listall("Angles")
    ]
예제 #8
0
def bondLabels():
    """ Returns a list of all existing bond labels."""
    return [
        apply(BondLabel, d["molid"] + d["atomid"])
        for d in label.listall("Bonds")
    ]
예제 #9
0
파일: labels.py 프로젝트: lumik/pyvmd
 def __iter__(self):
     for label in _label.listall(self.category):
         yield self._label_cls(
             *(Atom(a, Molecule(m))
               for a, m in zip(label['atomid'], label['molid'])))
예제 #10
0
파일: labels.py 프로젝트: lumik/pyvmd
 def __len__(self):
     return len(_label.listall(self.category))
예제 #11
0
def dihedralLabels():
	""" Returns a list of all existing dihedral labels."""
	return [apply(DihedralLabel, d["molid"]+d["atomid"]) for d in label.listall("Dihedrals")]
예제 #12
0
def angleLabels():
	""" Returns a list of all existing angle labels."""
	return [apply(AngleLabel, d["molid"]+d["atomid"]) for d in label.listall("Angles")]
예제 #13
0
def bondLabels():
	""" Returns a list of all existing bond labels."""
	return [apply(BondLabel, d["molid"]+d["atomid"]) for d in label.listall("Bonds")]
예제 #14
0
def atomLabels():
	""" Returns a list of all existing atom labels."""
	return [apply(AtomLabel, d["molid"]+d["atomid"]) for d in label.listall("Atoms")]