def from_coordinates(cls, coordinates):
        """Creates a `Primitive` from a list of coordinates."""
        prim = cls()
        for coord in coordinates:
            pm = PseudoMonomer(ampal_parent=prim)
            pa = PseudoAtom(coord, ampal_parent=pm)
            pm.atoms = OrderedDict([('CA', pa)])
            prim.append(pm)
        prim.relabel_all()
        return prim
def from_coordinates ( cls , coordinates ) : prim = cls ( ) for coord in coordinates : pm = PseudoMonomer ( ampal_parent = prim ) pa = PseudoAtom ( coord , ampal_parent = pm ) pm . atoms = OrderedDict ( [ ( 'CA' , pa ) ] ) prim . append ( pm ) prim . relabel_all ( ) return prim
Creates a `Primitive` from a list of coordinates.