示例#1
0
    def __init__(self, id):
        self.level="I"
        self.id=id
        self.neighbors = {}
        self.uniq_pairs = []

        Entity.__init__(self, id)
示例#2
0
 def __init__(self, id, resname, segid):
     """Initialize the class."""
     self.level = "R"
     self.disordered = 0
     self.resname = resname
     self.segid = segid
     Entity.__init__(self, id)
 def __init__(self,id):
     Entity.__init__(self, id)
     #Store the SEQRES protein. Whole its SEQRES will be record it
     self._SeqRes={}
     self._iSeq = -1
     #Store chain and its residue number. Because this value is very used. Thus, this dictionary help to get it
     self._ChainNumRes = {}
示例#4
0
 def __init__(self, id, resname, segid):
     """Initialize the class."""
     self.level = "R"
     self.disordered = 0
     self.resname = resname
     self.segid = segid
     Entity.__init__(self, id)
示例#5
0
    def add(self, atom):
        """Add an Atom object.

        Checks for adding duplicate atoms, and raises a
        PDBConstructionException if so.
        """
        atom_id=atom.get_id()
        if self.has_id(atom_id):
            raise PDBConstructionException( \
                "Atom %s defined twice in residue %s" % (atom_id, self))
        Entity.add(self, atom)
示例#6
0
    def add(self, atom):
        """Add an Atom object.

        Checks for adding duplicate atoms, and raises a
        PDBConstructionException if so.
        """
        atom_id = atom.get_id()
        if self.has_id(atom_id):
            raise PDBConstructionException(
                "Atom %s defined twice in residue %s" % (atom_id, self))
        Entity.add(self, atom)
示例#7
0
    def __init__(self, id, serial_num=None):
        """Arguments:
        o id - int
        o serial_num - int
        """
        self.level = "M"
        if serial_num is None:
            self.serial_num = id
        else:
            self.serial_num = serial_num

        Entity.__init__(self, id)
示例#8
0
    def __init__(self, id, serial_num=None):
        """
        Arguments:
        o id - int
        o serial_num - int
        """
        self.level = "M"
        if serial_num is None:
            self.serial_num = id
        else:
            self.serial_num = serial_num

        Entity.__init__(self, id)
示例#9
0
    def __init__(self, id, serial_num=None):
        """Initialize.

        Arguments:
         - id - int
         - serial_num - int

        """
        self.level = "M"
        if serial_num is None:
            self.serial_num = id
        else:
            self.serial_num = serial_num

        Entity.__init__(self, id)
示例#10
0
文件: Model.py 项目: kblin/biopython
    def __init__(self, id, serial_num=None):
        """Initialize.

        Arguments:
         - id - int
         - serial_num - int

        """
        self.level = "M"
        if serial_num is None:
            self.serial_num = id
        else:
            self.serial_num = serial_num

        Entity.__init__(self, id)
示例#11
0
 def __delitem__(self, id):
     """
     Arguments:
     o id - (string, int, string) or int
     """
     id=self._translate_id(id)
     return Entity.__delitem__(self, id)
示例#12
0
 def __delitem__(self, id):
     """
     Arguments:
     o id - (string, int, string) or int
     """
     id = self._translate_id(id)
     return Entity.__delitem__(self, id)
示例#13
0
    def __contains__(self, id):
        """True if a residue with given id is present in this chain.

        Arguments:
        o id - (string, int, string) or int
        """
        id = self._translate_id(id)
        return Entity.__contains__(self, id)
示例#14
0
    def __contains__(self, id):
        """True if a residue with given id is present in this chain.

        Arguments:
        o id - (string, int, string) or int
        """
        id=self._translate_id(id)
        return Entity.__contains__(self, id)
def get_hetero_atom_residues(struct: Entity) -> Iterator[Residue]:
    """ non-polymer ligands, excl. water

    BioPython's residue is a group of atoms belonging to the same molecule (made possible by mmcifs author_seq_id of heteroatoms,
    label_seq_id is '.' because a heterocompound does not belong to the poly-chain)
    scans all chains (we deliberately ignore author chain assignment in case of a heteroatom)"""

    return filter(lambda res: res.id[0].startswith('H_'),
                  struct.get_residues())  # .id[0] is a residue's hetatm flag
示例#16
0
    def __getitem__(self, id):
        """Return the residue with given id.

        The id of a residue is (hetero flag, sequence identifier, insertion code).
        If id is an int, it is translated to (" ", id, " ") by the _translate_id
        method.

        Arguments:
        o id - (string, int, string) or int
        """
        id=self._translate_id(id)
        return Entity.__getitem__(self, id)
示例#17
0
    def __getitem__(self, id):
        """Return the residue with given id.

        The id of a residue is (hetero flag, sequence identifier, insertion code).
        If id is an int, it is translated to (" ", id, " ") by the _translate_id
        method.

        Arguments:
        o id - (string, int, string) or int
        """
        id = self._translate_id(id)
        return Entity.__getitem__(self, id)
示例#18
0
文件: Chain.py 项目: ruda830/biovoice
 def __init__(self, id):
     """Initialize the class."""
     self.level = "C"
     self.internal_coord = None
     Entity.__init__(self, id)
def get_short_peptide_ligands(struct: Entity,
                              peptide_length_limit: int) -> Iterator[Chain]:
    return filter(
        lambda chain: sum(is_aa(residue)
                          for residue in chain) <= peptide_length_limit,
        struct.get_chains())
示例#20
0
 def __init__(self, id):
     """Initialize the class."""
     self.level = "S"
     Entity.__init__(self, id)
 def __init__(self,id):
     Entity.__init__(self, id)
     #Store the structure errors.
     self._dicStructureErrors= {}
示例#22
0
 def __init__(self, id, resname, segid):
     self.level="R"
     self.disordered=0
     self.resname=resname
     self.segid=segid
     Entity.__init__(self, id)
 def __init__(self,id):
     Entity.__init__(self, id)
     self._SeqRes = None
     self._SSBonds = None
     self._structureErrors = None
 def __init__(self,id):
     Entity.__init__(self, id)
     #Store the SSBONDS protein.
     self._SSBonds= {}
 def __init__(self, id):
     self.level = "S"
     Entity.__init__(self, id)
示例#26
0
 def __init__(self, id):
     """Initialize the class."""
     self.level = "S"
     Entity.__init__(self, id)