module Bio.PDB.Type where
import Control.DeepSeq (NFData (..))
import Data.Map.Strict (Map)
import Data.Text (Text)
import Data.Vector (Vector)
import GHC.Generics (Generic)
data PDB = PDB { PDB -> Text
title :: Text
, PDB -> Vector Model
models :: Vector Model
, :: Map RemarkCode RemarkData
, PDB -> Map FieldType RemarkData
otherFields :: Map FieldType FieldData
}
deriving (Int -> PDB -> ShowS
[PDB] -> ShowS
PDB -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PDB] -> ShowS
$cshowList :: [PDB] -> ShowS
show :: PDB -> String
$cshow :: PDB -> String
showsPrec :: Int -> PDB -> ShowS
$cshowsPrec :: Int -> PDB -> ShowS
Show, PDB -> PDB -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PDB -> PDB -> Bool
$c/= :: PDB -> PDB -> Bool
== :: PDB -> PDB -> Bool
$c== :: PDB -> PDB -> Bool
Eq, forall x. Rep PDB x -> PDB
forall x. PDB -> Rep PDB x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PDB x -> PDB
$cfrom :: forall x. PDB -> Rep PDB x
Generic, PDB -> ()
forall a. (a -> ()) -> NFData a
rnf :: PDB -> ()
$crnf :: PDB -> ()
NFData)
type = Maybe Int
type = Vector Text
type FieldData = Vector Text
data FieldType
=
| OBSLTE
| SPLIT
| CAVEAT
| COMPND
| SOURCE
| KEYWDS
| EXPDTA
| NUMMDL
| MDLTYP
| AUTHOR
| REVDAT
| SPRSDE
| JRNL
| DBREF
| DBREF1
| DBREF2
| SEQADV
| SEQRES
| MODRES
| HET
| FORMUL
| HETNAM
| HETSYN
| HELIX
| SHEET
| SSBOND
| LINK
| CISPEP
| SITE
| CRYST1
| MTRIX1
| MTRIX2
| MTRIX3
| ORIGX1
| ORIGX2
| ORIGX3
| SCALE1
| SCALE2
| SCALE3
| MASTER
deriving (Int -> FieldType -> ShowS
[FieldType] -> ShowS
FieldType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [FieldType] -> ShowS
$cshowList :: [FieldType] -> ShowS
show :: FieldType -> String
$cshow :: FieldType -> String
showsPrec :: Int -> FieldType -> ShowS
$cshowsPrec :: Int -> FieldType -> ShowS
Show, FieldType -> FieldType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: FieldType -> FieldType -> Bool
$c/= :: FieldType -> FieldType -> Bool
== :: FieldType -> FieldType -> Bool
$c== :: FieldType -> FieldType -> Bool
Eq, ReadPrec [FieldType]
ReadPrec FieldType
Int -> ReadS FieldType
ReadS [FieldType]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [FieldType]
$creadListPrec :: ReadPrec [FieldType]
readPrec :: ReadPrec FieldType
$creadPrec :: ReadPrec FieldType
readList :: ReadS [FieldType]
$creadList :: ReadS [FieldType]
readsPrec :: Int -> ReadS FieldType
$creadsPrec :: Int -> ReadS FieldType
Read, forall x. Rep FieldType x -> FieldType
forall x. FieldType -> Rep FieldType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep FieldType x -> FieldType
$cfrom :: forall x. FieldType -> Rep FieldType x
Generic, FieldType -> ()
forall a. (a -> ()) -> NFData a
rnf :: FieldType -> ()
$crnf :: FieldType -> ()
NFData, Eq FieldType
FieldType -> FieldType -> Bool
FieldType -> FieldType -> Ordering
FieldType -> FieldType -> FieldType
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: FieldType -> FieldType -> FieldType
$cmin :: FieldType -> FieldType -> FieldType
max :: FieldType -> FieldType -> FieldType
$cmax :: FieldType -> FieldType -> FieldType
>= :: FieldType -> FieldType -> Bool
$c>= :: FieldType -> FieldType -> Bool
> :: FieldType -> FieldType -> Bool
$c> :: FieldType -> FieldType -> Bool
<= :: FieldType -> FieldType -> Bool
$c<= :: FieldType -> FieldType -> Bool
< :: FieldType -> FieldType -> Bool
$c< :: FieldType -> FieldType -> Bool
compare :: FieldType -> FieldType -> Ordering
$ccompare :: FieldType -> FieldType -> Ordering
Ord)
type Model = Vector Chain
type Chain = Vector Atom
data Atom = Atom { Atom -> Int
atomSerial :: Int
, Atom -> Text
atomName :: Text
, Atom -> Char
atomAltLoc :: Char
, Atom -> Text
atomResName :: Text
, Atom -> Char
atomChainID :: Char
, Atom -> Int
atomResSeq :: Int
, Atom -> Char
atomICode :: Char
, Atom -> Float
atomX :: Float
, Atom -> Float
atomY :: Float
, Atom -> Float
atomZ :: Float
, Atom -> Float
atomOccupancy :: Float
, Atom -> Float
atomTempFactor :: Float
, Atom -> Text
atomElement :: Text
, Atom -> Text
atomCharge :: Text
}
deriving (Int -> Atom -> ShowS
[Atom] -> ShowS
Atom -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Atom] -> ShowS
$cshowList :: [Atom] -> ShowS
show :: Atom -> String
$cshow :: Atom -> String
showsPrec :: Int -> Atom -> ShowS
$cshowsPrec :: Int -> Atom -> ShowS
Show, Atom -> Atom -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Atom -> Atom -> Bool
$c/= :: Atom -> Atom -> Bool
== :: Atom -> Atom -> Bool
$c== :: Atom -> Atom -> Bool
Eq, forall x. Rep Atom x -> Atom
forall x. Atom -> Rep Atom x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Atom x -> Atom
$cfrom :: forall x. Atom -> Rep Atom x
Generic, Atom -> ()
forall a. (a -> ()) -> NFData a
rnf :: Atom -> ()
$crnf :: Atom -> ()
NFData)
instance Ord Atom where
Atom
a1 <= :: Atom -> Atom -> Bool
<= Atom
a2 = (Atom -> Int
atomSerial Atom
a1, Atom -> Char
atomChainID Atom
a1) forall a. Ord a => a -> a -> Bool
<= (Atom -> Int
atomSerial Atom
a2, Atom -> Char
atomChainID Atom
a2)