Exemple #1
0
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
Exemple #2
0
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
Exemple #3
0
 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'])))
Exemple #4
0
 def __len__(self):
     return len(_label.listall(self.category))
Exemple #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")
    ]
Exemple #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")
    ]
Exemple #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")
    ]
Exemple #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")
    ]
Exemple #9
0
 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'])))
Exemple #10
0
 def __len__(self):
     return len(_label.listall(self.category))
def dihedralLabels():
	""" Returns a list of all existing dihedral labels."""
	return [apply(DihedralLabel, d["molid"]+d["atomid"]) for d in label.listall("Dihedrals")]
def angleLabels():
	""" Returns a list of all existing angle labels."""
	return [apply(AngleLabel, d["molid"]+d["atomid"]) for d in label.listall("Angles")]
def bondLabels():
	""" Returns a list of all existing bond labels."""
	return [apply(BondLabel, d["molid"]+d["atomid"]) for d in label.listall("Bonds")]
def atomLabels():
	""" Returns a list of all existing atom labels."""
	return [apply(AtomLabel, d["molid"]+d["atomid"]) for d in label.listall("Atoms")]