B
    โ๊๕bท  ใ               @   s  d Z ddlZG dd deZG dd deZG dd deZG d	d
 d
eZG dd deZG dd deZG dd deZ	G dd deZ
G dd deZG dd deZG dd deZG dd deZG dd deZG dd deZG dd  d eZG d!d" d"eZG d#d$ d$eZG d%d& d&eZG d'd( d(eZG d)d* d*eZG d+d, d,eZejd-ed. G d/d0 d0eZG d1d2 d2eZG d3d4 d4eZG d5d6 d6eZG d7d8 d8eZG d9d: d:eZG d;d< d<eZ G d=d> d>eZ!G d?d@ d@eZ"G dAdB dBeZ#dS )CzS
This module contains all of the exceptions that are used in the chemistry
package
้    Nc               @   s   e Zd ZdZdS )ฺParmedErrorz< Base class for all non-trivial exceptions raised by ParmEd N)ฺ__name__ฺ
__module__ฺ__qualname__ฺ__doc__ฉ r   r   ๚0lib/python3.7/site-packages/parmed/exceptions.pyr   	   s   r   c               @   s   e Zd ZdZdS )ฺParsingErrorz1 If there was a problem parsing any kind of file N)r   r   r   r   r   r   r   r   r	      s   r	   c               @   s   e Zd ZdZdS )ฺPDBErrorz+ If there was a problem parsing a PDB file N)r   r   r   r   r   r   r   r   r
      s   r
   c               @   s   e Zd ZdZdS )ฺ	Mol2Errorz, If there was a problem parsing a Mol2 file N)r   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd ZdZdS )ฺ	MaskErrorz$ Error when a Mask is poorly formed N)r   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd ZdZdS )ฺOpenMMErrorz. If there's a problem making an OpenMM system N)r   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd ZdZdS )ฺ
AmberErrorz" This is a generic AmberParmError N)r   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd ZdZdS )ฺTinkerErrorz@ Raised when one of the TINKER parsing routines hits a bad file N)r   r   r   r   r   r   r   r   r      s   r   c               @   s   e Zd ZdZdS )ฺCharmmErrorz0 If there is a problem parsing CHARMM PSF files N)r   r   r   r   r   r   r   r   r   !   s   r   c               @   s   e Zd ZdZdS )ฺResidueErrorz0 For when there are problems defining a residue N)r   r   r   r   r   r   r   r   r   $   s   r   c               @   s   e Zd ZdZdS )ฺIncompatiblePatchErrorz> For when applying a PatchTemplate to a ResidueTemplate fails N)r   r   r   r   r   r   r   r   r   '   s   r   c               @   s   e Zd ZdZdS )ฺParameterErrorz+ If a parameter is missing from a database N)r   r   r   r   r   r   r   r   r   *   s   r   c               @   s   e Zd ZdZdS )ฺGromacsErrorz6 If there is a problem parsing GROMACS topology files N)r   r   r   r   r   r   r   r   r   -   s   r   c               @   s   e Zd ZdZdS )ฺFormatNotFoundz> If the file format does not have a registered parser with it N)r   r   r   r   r   r   r   r   r   0   s   r   c               @   s   e Zd ZdZdS )ฺRosettaErrorz5 If there is a problem loading a Rosetta pose object N)r   r   r   r   r   r   r   r   r   3   s   r   c               @   s   e Zd ZdZdS )ฺPreProcessorErrorz7 If there is a problem running the C-like preprocessor N)r   r   r   r   r   r   r   r   r   6   s   r   c               @   s   e Zd ZdZdS )ฺMoleculeErrorz> If there is a problem defining a molecule via the bond graph N)r   r   r   r   r   r   r   r   r   9   s   r   c               @   s   e Zd ZdZdS )ฺ	PdbxErrorz; Class for catching general errors with PDBx/mmCIF parsing N)r   r   r   r   r   r   r   r   r   <   s   r   c               @   s"   e Zd ZdZd	ddZdd ZdS )
ฺPdbxSyntaxErrorz0 Class for catching errors in mmCIF/PDBx syntax ๚-1ฺ c             C   s   t  | ก || _|| _d S )N)ฺ	Exceptionฺ__init__ฺ
lineNumberฺtext)ฺselfr   r    r   r   r   r   A   s    
zPdbxSyntaxError.__init__c             C   s   d| j | jf S )Nz%%ERROR - [at line: %d] %s)r   r    )r!   r   r   r   ฺ__str__F   s    zPdbxSyntaxError.__str__N)r   r   )r   r   r   r   r   r"   r   r   r   r   r   ?   s   
r   c               @   s   e Zd ZdZdS )ฺ
InputErrorz# When there is an error with input N)r   r   r   r   r   r   r   r   r#   I   s   r#   c               @   s   e Zd ZdZdS )ฺParmedWarningz. Base class for all warnings raised by ParmEd N)r   r   r   r   r   r   r   r   r$   N   s   r$   ฺalways)ฺcategoryc               @   s   e Zd ZdZdS )ฺ
PDBWarningz6 A non-fatal error to indicate a problematic PDB file N)r   r   r   r   r   r   r   r   r'   T   s   r'   c               @   s   e Zd ZdZdS )ฺAmberWarningz) If there is something that is non-fatal N)r   r   r   r   r   r   r   r   r(   W   s   r(   c               @   s   e Zd ZdZdS )ฺSplitResidueWarningzD For if a residue with the same number but different names is split N)r   r   r   r   r   r   r   r   r)   Z   s   r)   c               @   s   e Zd ZdZdS )ฺCharmmWarningz" For non-fatal PSF parsing issues N)r   r   r   r   r   r   r   r   r*   ]   s   r*   c               @   s   e Zd ZdZdS )ฺGromacsWarningzI If we are uncertain about something regarding the GROMACS topology file N)r   r   r   r   r   r   r   r   r+   `   s   r+   c               @   s   e Zd ZdZdS )ฺParameterWarningzF If a type of parameter is missing, but you don't want it to be fatal N)r   r   r   r   r   r   r   r   r,   c   s   r,   c               @   s   e Zd ZdS )ฺTinkerWarningN)r   r   r   r   r   r   r   r-   f   s   r-   c               @   s   e Zd ZdZdS )ฺPreProcessorWarningz= If there is something we should warn about in preprocessing N)r   r   r   r   r   r   r   r   r.   i   s   r.   c               @   s   e Zd ZdZdS )ฺOpenMMWarningzE If there is something we should warn when processing OpenMM objects N)r   r   r   r   r   r   r   r   r/   l   s   r/   c               @   s   e Zd ZdZdS )ฺCharmmPsfEOFz2 If we hit an end-of-file in parsing CHARMM files N)r   r   r   r   r   r   r   r   r0   q   s   r0   )$r   ฺwarningsr   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r#   ฺWarningr$   ฺfilterwarningsr'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r   r   r   r   ฺ<module>   sB   
