o
    Rŀg6	                     @   s\   d Z ddlmZ ddlmZ ddlmZ er"ddlmZ ddl	m
Z
 G dd ded	 Zd
S )z'Model class, used in Structure objects.    )TYPE_CHECKING)Entity)IC_Chain)Chain)	Structurec                   @   sb   e Zd ZdZdddZdd Zdd Zd	d
 Zdd Zdde	ddfddZ
dde	ddfddZdS )ModelzThe object representing a model in a structure.

    In a structure derived from an X-ray crystallography experiment,
    only a single model will be present (with some exceptions). NMR
    structures normally contain many different models.
    Nc                 C   s,   d| _ |du r|| _n|| _t| | dS )zYInitialize.

        Arguments:
         - id - int
         - serial_num - int

        MN)level
serial_numr   __init__)selfidr
    r   A/var/www/html/myenv/lib/python3.10/site-packages/Bio/PDB/Model.pyr      s
   zModel.__init__c                 C   s   d|    dS )zReturn model identifier.z
<Model id=>)get_idr   r   r   r   __repr__*   s   zModel.__repr__c                 c   s    | E dH  dS )zReturn chains.Nr   r   r   r   r   
get_chains.   s   zModel.get_chainsc                 c       |   D ]}|E dH  qdS )zReturn residues.N)r   )r   cr   r   r   get_residues2      zModel.get_residuesc                 c   r   )zReturn atoms.N)r   )r   rr   r   r   	get_atoms7   r   zModel.get_atomsFverbosereturnc                 C      |   D ]}|| qdS )zCreate/update internal coordinates from Atom X,Y,Z coordinates.

        Internal coordinates are bond length, angle and dihedral angles.

        :param verbose bool: default False
            describe runtime problems
        N)r   atom_to_internal_coordinatesr   r   chnr   r   r   r   <      z"Model.atom_to_internal_coordinatesc                 C   r   )zCreate/update atom coordinates from internal coordinates.

        :param verbose bool: default False
            describe runtime problems

        :raises Exception: if any chain does not have .pic attribute
        N)r   internal_to_atom_coordinatesr   r   r   r   r"   G   r!   z"Model.internal_to_atom_coordinates)N)F)__name__
__module____qualname____doc__r   r   r   r   r   boolr   r"   r   r   r   r   r      s    
r   )r   r   N)r&   typingr   Bio.PDB.Entityr   Bio.PDB.internal_coordsr   Bio.PDB.Chainr   Bio.PDB.Structurer   r   r   r   r   r   <module>   s   