SCHEMA MSDbase
  DATABASE: MSDbase
  DESCRIPTION: "This is the primary MSDbase schema.  It defines the primary archive
database for MSD.  Objects defined in this database is used to generate
the standard PDB entries.
Jaime Prilusky, Enrique E. Abola
"

NAMED PRIMITIVE VALUE CLASS aminoTorsion: FLOAT
  DESCRIPTION: "Torsion angles for amino acids"

NAMED PRIMITIVE VALUE CLASS cvLocalID: INTEGER
  DESCRIPTION: "Internal ID for objects that do not have a natural ID like MATRIX"

NAMED PRIMITIVE VALUE CLASS MSD_ID: VARCHAR(4)
  DEFAULT: "4"

CONTROLLED VALUE CLASS cvBondTypes
  { ( "covalent-single", sysdefined ),
    ( "covalent-double", sysdefined ),
    ( "covalent-triple", sysdefined ),
    ( "covalent-aromatic", sysdefined ),
    ( "covalent-peptide", sysdefined ),
    ( "SS-bond", sysdefined ),
    ( "H-bond", sysdefined ),
    ( "Salt Bridge", sysdefined ),
    ( "covalent-coordinate", sysdefined ) }
  DESCRIPTION: "Types of bonds found in molecules"

CONTROLLED VALUE CLASS cvDatabaseDict
  { ( 0, "PDB" ),
    ( 1, "SwissProt" ),
    ( 2, "GDB" ),
    ( 3, "GenBank" ),
    ( 4, "PIR" ),
    ( 5, "Medline" ),
    ( 6, "Enzyme" ),
    ( 7, "PDB_HET_DICT" ),
    ( 8, "CitDB" ),
    ( 9, "Protein Mutant Database" ) }
  DESCRIPTION: "Controlled vocabulary for valid databases"

CONTROLLED VALUE CLASS cvExperimentTypes
  { ( 0, "X-Ray" ),
    ( 1, "NMR" ),
    ( 2, "Theoretical Model" ),
    ( 3, "Neutron Diffraction" ),
    ( 4, "Fiber Diffraction" ) }
  DESCRIPTION: "Contents of EXPDTA"

CONTROLLED VALUE CLASS cvFlagDict
  { ( 1, "Yes" ),
    ( 0, "No" ) }
  DEFAULT: 0
  DESCRIPTION: "Controlled vocabulary for boolean values YES and NO"

CONTROLLED VALUE CLASS cvHelixClass
  { ( "right-handed alpha", sysdefined ),
    ( "right-handed pi", sysdefined ),
    ( "right-handed 3/10", sysdefined ),
    ( "left-handed omega", sysdefined ),
    ( "2/7 ribbon/helix", sysdefined ),
    ( "right-handed omega", sysdefined ),
    ( "right-handed gamma", sysdefined ),
    ( "left-handed alpha", sysdefined ),
    ( "left-handed gamma", sysdefined ),
    ( "polyproline", sysdefined ) }
  CODE_TYPE: INTEGER
  DESCRIPTION: "standard PDB helix class"

CONTROLLED VALUE CLASS cvMacroMoleculeType
  { ( 0, "protein" ),
    ( 1, "dna" ),
    ( 2, "rna" ),
    ( 3, "polysaccharide" ),
    ( 4, "other - must annotate" ) }
  DESCRIPTION: "contains what kind of macmromolecule this is"

CONTROLLED VALUE CLASS cvMtrixType
  { ( 1, "Generative" ),
    ( 0, "Descriptive" ) }
  DEFAULT: 0

CONTROLLED VALUE CLASS cvPDBResidueType
  { ( "atom", sysdefined ),
    ( "heterogen", sysdefined ),
    ( "solvent", sysdefined ) }
  DESCRIPTION: "residues in PDB entries are atoms,hetatms, and solvents"

CONTROLLED VALUE CLASS cvResourceType
  { ( "image", sysdefined ),
    ( "movie", sysdefined ),
    ( "gelfile", sysdefined ),
    ( "database", sysdefined ),
    ( "lookup table", sysdefined ),
    ( "archive", sysdefined ),
    ( "directory", sysdefined ) }

CONTROLLED VALUE CLASS exp_resolution
  { 0 - 10 }
  DEFAULT: 1

OBJECT CLASS oAmino_acid
             isa* oResidueMolec
  ATTRIBUTE aPhi: [0,1] aminoTorsion
  ATTRIBUTE aPsi: [0,1] aminoTorsion
  ATTRIBUTE aOmega: [0,1] aminoTorsion
  ATTRIBUTE aChi1: [0,1] aminoTorsion
  ATTRIBUTE aChi2: [0,1] aminoTorsion
  ATTRIBUTE aChi3: [0,1] aminoTorsion
  ATTRIBUTE aChi4: [0,1] aminoTorsion

OBJECT CLASS oAnnotations
  DESCRIPTION: "REMARK and FTNOTE records go here"
  ID: aLocalID
  REP: aRemarkNum
  ATTRIBUTE aAnnotations: [0,1] TEXT
            DESCRIPTION: "long paragraphs get extra lines"
  ATTRIBUTE aRemarkNum: [1,1] VARCHAR(10)
  ATTRIBUTE aLocalID: [1,1] cvLocalID

OBJECT CLASS oAsu
  DESCRIPTION: "crystal asymmetric unit"
  ID: aMSDID
  REP: aMSDID
  ATTRIBUTE aAsuChains: set-of [0,] oChain
  ATTRIBUTE aHetGroups: set-of [0,] oHet
  ATTRIBUTE aSolvent: set-of [0,] oSolventMolecule
  ATTRIBUTE aMSDID: [1,1] MSD_ID

OBJECT CLASS oAtom
  DESCRIPTION: "each PDB atoms"
  ID: aLocalID
  REP: aAtomName
  ATTRIBUTE aAlternate_site: [0,1] CHAR(1)
            DESCRIPTION: "atoms which are disordered must have alternate sites assigned"
  ATTRIBUTE aAtomName: [1,1] VARCHAR(4)
  ATTRIBUTE aElementSymbol: [1,1] VARCHAR(4)
            DESCRIPTION: "element name, in some cases include the ionic form"
  ATTRIBUTE aOccupancy: [0,1] FLOAT
  ATTRIBUTE aTempFact: [0,1] FLOAT
  ATTRIBUTE aCoord (x, y, z):
             [1,1] ([1,1] FLOAT, [1,1] FLOAT, [1,1] FLOAT)
  ATTRIBUTE aBondAtom (aBondType, aAtom):
            set-of [0,] ([0,1] cvBondTypes, [0,1] oAtom)
  ATTRIBUTE aLocalID: [1,1] cvLocalID

OBJECT CLASS oAtomAnisoU
             isa oAtom
  DESCRIPTION: "Anisotropic Thermal Parameters"
  ATTRIBUTE u11: [1,1] FLOAT
  ATTRIBUTE u13: [1,1] FLOAT
  ATTRIBUTE u22: [1,1] FLOAT
  ATTRIBUTE u23: [1,1] FLOAT
  ATTRIBUTE u33: [1,1] FLOAT

OBJECT CLASS oAtomAnisoUSigma
             isa oAtom
  DESCRIPTION: "Anisotropic Thermal Parameters"
  ATTRIBUTE sigmau11: [1,1] FLOAT
  ATTRIBUTE sigmau13: [1,1] FLOAT
  ATTRIBUTE sigmau22: [1,1] FLOAT
  ATTRIBUTE sigmau23: [1,1] FLOAT
  ATTRIBUTE sigmau33: [1,1] FLOAT

OBJECT CLASS oAtomSigma
             isa oAtom
  DESCRIPTION: "each PDB atoms"
  ATTRIBUTE sigmaX: [1,1] FLOAT
  ATTRIBUTE sigmaY: [1,1] FLOAT
  ATTRIBUTE sigmaZ: [1,1] FLOAT

OBJECT CLASS oBond
  DESCRIPTION: "bonding between two atoms"
  ID: aBondType, aLocalID
  REP: aBondType
  ATTRIBUTE aBondType: [1,1] cvBondTypes
  ATTRIBUTE aAtom1: [1,1] oAtom
            DESCRIPTION: "first atoms in a bonding pair"
  ATTRIBUTE aAtom2: [1,1] oAtom
            DESCRIPTION: "second atom in a bonding pair"
  ATTRIBUTE aLocalID: [1,1] cvLocalID

OBJECT CLASS oChain
  DESCRIPTION: "polypeptide chain"
  ID: aLocalID
  REP: aChainID
  ATTRIBUTE aChainID: [1,1] CHAR(1)
  ATTRIBUTE aResRun: list-of [1,] oResidueMolec
  ATTRIBUTE aHetGroups: set-of [0,] oResidueMolec
  ATTRIBUTE aSolvents: set-of [0,] oResidueMolec
  ATTRIBUTE aMSDID: [0,1] MSD_ID
  ATTRIBUTE aLocalID: [1,1] cvLocalID

OBJECT CLASS oCrystal
  ID: aMSDID
  REP: aMSDID
  ATTRIBUTE aCellDimensions (a, b, c, alpha, beta, gamma):
             [1,1] ([1,1] FLOAT, [1,1] FLOAT, [1,1] FLOAT, [1,1] 
                        FLOAT, [1,1] FLOAT, [1,1] FLOAT)
  ATTRIBUTE aSpaceGroups: [1,1] VARCHAR(12)
  ATTRIBUTE aZvalue: [1,1] INTEGER
  ATTRIBUTE aCellVolume: [1,1] FLOAT
  ATTRIBUTE aStdSettingFlag: [1,1] BOOLEAN
  ATTRIBUTE aVs: [1,1] FLOAT
            DESCRIPTION: "% solvent"
  ATTRIBUTE aMatthewsCoeff: [1,1] FLOAT
  ATTRIBUTE oOperators: set-of [0,] VARCHAR(15)
  ATTRIBUTE aMSDID: [1,1] MSD_ID

OBJECT CLASS oDiffractRefinement
             isa* oRefinement
  REP: aRefineType
  ATTRIBUTE aAnalysis: [1,1] oAnnotations
  ATTRIBUTE aRefineType: [0,1] VARCHAR(80)
  ATTRIBUTE aRvalue: [0,1] FLOAT
  ATTRIBUTE aRmsdBondDist: [0,1] FLOAT

OBJECT CLASS oDiffractStudy
             isa* oExperiment
  ATTRIBUTE aResolution: [0,1] FLOAT
  ATTRIBUTE aRefinement: [0,1] oDiffractRefinement
  ATTRIBUTE aCrystalData: [0,1] oCrystal
  ATTRIBUTE aORIGX: [0,1] oMatrix
  ATTRIBUTE aSCALE: [0,1] oMatrix
  ATTRIBUTE aMTRIX (aMtrixNum, aTransfrm, aRes1, aRes2, aTransfType):
            set-of [0,] ([1,1] INTEGER, [1,1] oMatrix, [0,1] 
                        oResidueMolec, [0,1] oResidueMolec, [1,1] 
                        cvMtrixType)
  ATTRIBUTE aCrystalContents: [0,1] oAsu

OBJECT CLASS oExperiment
             isa oMSDExportObj
  ATTRIBUTE aTitle: list-of [1,] VARCHAR(255)
  ATTRIBUTE aDepositor: list-of [1,] oPerson
  ATTRIBUTE aKeywords: set-of [0,] VARCHAR(80)
  ATTRIBUTE aExpdta: [1,1] cvExperimentTypes
            DESCRIPTION: "experiment type"
  ATTRIBUTE aReference: list-of [0,] oExternalReference
  ATTRIBUTE aRemarks: set-of [0,] oAnnotations

OBJECT CLASS oExtRefDict
  ID: aURL
  REP: aURL
  ATTRIBUTE aDBname: [0,1] cvDatabaseDict
  ATTRIBUTE aURL: [1,1] VARCHAR(255)
  ATTRIBUTE aSummLine: [0,1] VARCHAR(255)
            DESCRIPTION: "Store explanation or description here"
  ATTRIBUTE aAlternateAccess: [0,1] VARCHAR(255)

OBJECT CLASS oExternalReference
  DESCRIPTION: "pointer to external database"
  ID: aLocalID
  REP: aExDBExportObj, aSummLine
  ATTRIBUTE aExDBExportObj: [1,1] VARCHAR(20)
  ATTRIBUTE aSelectStart: [0,1] INTEGER
  ATTRIBUTE aSelectEnd: [0,1] INTEGER
  ATTRIBUTE aExtDBName: [0,1] oExtRefDict
  ATTRIBUTE aExDBAlias: set-of [0,] VARCHAR(20)
  ATTRIBUTE aLocalID: [1,1] cvLocalID
  ATTRIBUTE aSummLine: [0,1] VARCHAR(255)

OBJECT CLASS oHelixPDB
  ID: aLocalID
  ATTRIBUTE aHelixName: [1,1] CHAR(3)
  ATTRIBUTE aStartRes: [0,1] oResidueMolec
  ATTRIBUTE aEndRes: [0,1] oResidueMolec
  ATTRIBUTE aHelixClass: [0,1] cvHelixClass
  ATTRIBUTE aHelixAnnotation: [0,1] VARCHAR(255)
  ATTRIBUTE aHelixLen: [0,1] INTEGER
  ATTRIBUTE aLocalID: [1,1] cvLocalID
  ATTRIBUTE aMSDID: [0,1] MSD_ID

OBJECT CLASS oHet
  ID: aLocalID
  REP: aMolName
  ATTRIBUTE aFormula: [1,1] VARCHAR(80)
  ATTRIBUTE aMolName: [1,1] VARCHAR(255)
            DESCRIPTION: "Macromolecule or Het Name"
  ATTRIBUTE aHetAnnotate: [0,1] oAnnotations
  ATTRIBUTE aLocalID: [1,1] cvLocalID
  ATTRIBUTE aHetRes: set-of [0,] oResidueMolec

OBJECT CLASS oHetDictionary
  DESCRIPTION: "Contents of Current Connect file"
  ID: aHetID
  ATTRIBUTE aConectDat: [1,1] TEXT
  ATTRIBUTE aHetName: set-of [1,] VARCHAR(255)
  ATTRIBUTE aFormula: [0,1] VARCHAR(80)
  ATTRIBUTE aHetSample: set-of [0,] oResidueMolec
  ATTRIBUTE aBonds: list-of [0,] oBond
  ATTRIBUTE aHetID: [1,1] CHAR(3)
  ATTRIBUTE aHetPicture: [0,1] TEXT

OBJECT CLASS oMSDExportObj
  DESCRIPTION: "External ID for entry"
  ID: aMSDID, aMODID
  REP: aMSDID
  ATTRIBUTE aMSDID: [1,1] MSD_ID
  ATTRIBUTE aMODID: [1,1] VARCHAR(10)
  ATTRIBUTE aAccessionDate: [1,1] DATETIME
  ATTRIBUTE aRevdat (revDate, revType, revComment, revID):
            list-of [0,] ([1,1] DATETIME, [1,1] TINYINT, [0,1] 
                        VARCHAR(255), [1,1] VARCHAR(10))

OBJECT CLASS oMacroMolecule
  ID: aLocalID
  ATTRIBUTE aMSDID: [0,1] CHAR(4)
            DESCRIPTION: "MSD-Ident Code"
  ATTRIBUTE aMolName: set-of [0,] VARCHAR(80)
  ATTRIBUTE aSrcDescr: [0,1] oSource
  ATTRIBUTE aMolType: [0,1] cvMacroMoleculeType
  ATTRIBUTE aBioMol: [0,1] VARCHAR(255)
  ATTRIBUTE aCoordinates: set-of [0,] oChain
  ATTRIBUTE aMolSequence: list-of [0,] oPrimarySeq
  ATTRIBUTE aDomain: [0,1] VARCHAR(100)
  ATTRIBUTE aEngineered: [0,1] cvFlagDict
  ATTRIBUTE aEnzyme: set-of [0,] oExternalReference
  ATTRIBUTE aMutation: [0,1] VARCHAR(255)
  ATTRIBUTE aFormula: [0,1] VARCHAR(80)
  ATTRIBUTE aMolWeight: [0,1] FLOAT
  ATTRIBUTE aLocalID: [1,1] cvLocalID
            DESCRIPTION: "use identity"
  ATTRIBUTE aAnnotate (aSummLine, aExtDB):
            set-of [0,] ([0,1] VARCHAR(255), [0,1] oExternalReference)
            DESCRIPTION: "Include other annotations on the molecule here"

OBJECT CLASS oMatrix
  ID: aLocalID
  REP: aSummLine
  ATTRIBUTE aSummLine: [1,1] VARCHAR(80)
  ATTRIBUTE a11: [1,1] FLOAT
  ATTRIBUTE a12: [1,1] FLOAT
  ATTRIBUTE a13: [1,1] FLOAT
  ATTRIBUTE a14: [1,1] FLOAT
  ATTRIBUTE a21: [1,1] FLOAT
  ATTRIBUTE a22: [1,1] FLOAT
  ATTRIBUTE a23: [1,1] FLOAT
  ATTRIBUTE a24: [1,1] FLOAT
  ATTRIBUTE a31: [1,1] FLOAT
  ATTRIBUTE a32: [1,1] FLOAT
  ATTRIBUTE a33: [1,1] FLOAT
  ATTRIBUTE a34: [1,1] FLOAT
  ATTRIBUTE aLocalID: [1,1] cvLocalID

OBJECT CLASS oModel
  ID: aLocalID
  REP: aMSDID
  ATTRIBUTE aModelNumber: [1,1] INTEGER
  ATTRIBUTE aModelContents: set-of [0,] oChain
  ATTRIBUTE aLocalID: [1,1] INTEGER
  ATTRIBUTE aMSDID: [0,1] MSD_ID

OBJECT CLASS oNMRRefinement
             isa* oRefinement
  ATTRIBUTE aNMRAnalysis: [1,1] oAnnotations
  ATTRIBUTE aRmsdBondDist: [0,1] FLOAT

OBJECT CLASS oNMRStudy
             isa* oExperiment
  ATTRIBUTE aModels: set-of [1,] oModel
  ATTRIBUTE aRefinement: [0,1] oNMRRefinement

OBJECT CLASS oPerson
  DESCRIPTION: "person"
  ID: person_id
  REP: surname
  ATTRIBUTE address: [0,1] CHAR(80)
  ATTRIBUTE affiliation: [0,1] CHAR(24)
  ATTRIBUTE department: [0,1] CHAR(20)
  ATTRIBUTE email: [0,1] CHAR(24)
  ATTRIBUTE employer: [0,1] CHAR(16)
  ATTRIBUTE given_name: [0,1] CHAR(16)
  ATTRIBUTE person_id: [1,1] VARCHAR(32)
  ATTRIBUTE phone: [0,1] CHAR(16)
  ATTRIBUTE position: [0,1] CHAR(40)
  ATTRIBUTE surname: [0,1] CHAR(16)

OBJECT CLASS oPrimarySeq
  ID: aLocalID
  REP: aSummLine
  ATTRIBUTE aSeqRef: [0,1] oExternalReference
  ATTRIBUTE aMSDSeqStart: [0,1] oResidueMolec
  ATTRIBUTE aMSDSeqEnd: [0,1] oResidueMolec
  ATTRIBUTE aSeqAdv: list-of [0,] oSeqAdv
  ATTRIBUTE aSummLine: [0,1] VARCHAR(10)
  ATTRIBUTE aLocalID: [1,1] cvLocalID

OBJECT CLASS oRefinement
  ID: todefine
  REP: todefine
  ATTRIBUTE todefine: [1,1] VARCHAR(10)

OBJECT CLASS oResidueMolec
  ID: aLocalID
  REP: aResName
  ATTRIBUTE aOrdSeq: [0,1] INTEGER
            DESCRIPTION: "Ordinal Sequence Number from Origin Entry"
  ATTRIBUTE aSeqWithInsc: [1,1] VARCHAR(5)
  ATTRIBUTE aResName: [0,1] CHAR(3)
  ATTRIBUTE aAtoms: list-of [0,] oAtom
  ATTRIBUTE aNumAtoms
            DERIVATION: count of aAtoms
  ATTRIBUTE aModRes (aStdName, aModName, aModDscr):
             [0,1] ([0,1] CHAR(3), [0,1] CHAR(3), [0,1] 
                        VARCHAR(41))
  ATTRIBUTE aResMolChain: [1,1] VARCHAR(4)
  ATTRIBUTE aLocalID: [1,1] cvLocalID
  ATTRIBUTE aMSDID: [0,1] MSD_ID

OBJECT CLASS oSeqAdv
  ID: aLocalID
  REP: aConflictSum
  ATTRIBUTE aMSDSeq: [0,1] oResidueMolec
  ATTRIBUTE aConflictSeq (aConflictName, aConflictNum):
             [0,1] ([0,1] VARCHAR(3), [0,1] INTEGER)
  ATTRIBUTE aConflictSum: [0,1] VARCHAR(20)
  ATTRIBUTE aLocalID: [1,1] cvLocalID
            DESCRIPTION: "use an  _id type here"

OBJECT CLASS oSheetPDB
  ID: aLocalID
  REP: aSheetID
  ATTRIBUTE aSheetID: [1,1] VARCHAR(3)
  ATTRIBUTE aNumStrands
            DERIVATION: count of aStrands
  ATTRIBUTE aStrands: list-of [0,] oSheetStrand
  ATTRIBUTE aMSDID: [0,1] MSD_ID
  ATTRIBUTE aLocalID: [1,1] cvLocalID

OBJECT CLASS oSheetStrand
  ID: aLocalID
  REP: aSumLine
  ATTRIBUTE aStartRes: [1,1] oResidueMolec
  ATTRIBUTE aEndRes: [1,1] oResidueMolec
  ATTRIBUTE aStrandLen: [0,1] INTEGER
  ATTRIBUTE aStrandSense: [0,1] INTEGER
  ATTRIBUTE aRgstrnInCurrent: [0,1] oAtom
  ATTRIBUTE aSumLine: [0,1] VARCHAR(40)
  ATTRIBUTE aLocalID: [1,1] cvLocalID

OBJECT CLASS oSitePDB
  ID: aLocalID
  ATTRIBUTE aSiteID: [1,1] VARCHAR(3)
            DESCRIPTION: "Store SiteID + MSDID here"
  ATTRIBUTE aSiteRes: set-of [0,] oResidueMolec
  ATTRIBUTE aResNumInSite
            DERIVATION: count of aSiteRes
  ATTRIBUTE aSiteAnnotate: [0,1] oAnnotations
  ATTRIBUTE aMSDID: [0,1] MSD_ID
  ATTRIBUTE aLocalID: [1,1] cvLocalID

OBJECT CLASS oSolventMolecule
  ID: aSolventRes
  REP: aMolName
  ATTRIBUTE aFormula: [0,1] VARCHAR(80)
  ATTRIBUTE aMolName: [0,1] VARCHAR(255)
            DESCRIPTION: "Macromolecule or Het Name"
  ATTRIBUTE aHetAnnotate: [0,1] VARCHAR(255)
  ATTRIBUTE aSolventRes: [1,1] oResidueMolec

OBJECT CLASS oSource
  ID: aSourceID
  REP: aSummLine
  ATTRIBUTE aATCC: [0,1] oExternalReference
  ATTRIBUTE aCellLine: [0,1] VARCHAR(60)
  ATTRIBUTE aCellType: [0,1] VARCHAR(60)
  ATTRIBUTE aExpressionSys (gene, name, plasmid):
             [0,1] ([0,1] VARCHAR(40), [0,1] VARCHAR(255), [0,1] 
                        VARCHAR(60))
  ATTRIBUTE aNonBiolSrc: [0,1] cvFlagDict
  ATTRIBUTE aOrganName: [0,1] VARCHAR(20)
  ATTRIBUTE aOrganelle: [0,1] VARCHAR(20)
  ATTRIBUTE aOrganismName (common, scientific):
             [1,1] ([1,1] VARCHAR(80), [1,1] VARCHAR(80))
  ATTRIBUTE aStrain: [0,1] VARCHAR(60)
  ATTRIBUTE aTissueName: [0,1] VARCHAR(20)
  ATTRIBUTE aVariant: [0,1] VARCHAR(60)
  ATTRIBUTE aSummLine: [0,1] VARCHAR(255)
  ATTRIBUTE aSourceID: [1,1] INTEGER

OBJECT CLASS oTurnPDB
  ID: aTurnID, aLocalID
  REP: aTurnID
  ATTRIBUTE aTurnID: [1,1] VARCHAR(3)
  ATTRIBUTE aStartRes: [0,1] oResidueMolec
  ATTRIBUTE aEndRes: [0,1] oResidueMolec
  ATTRIBUTE aTurnAnnotate: [0,1] VARCHAR(255)
  ATTRIBUTE aTurnLen: [0,1] INTEGER
  ATTRIBUTE aMSDID: [0,1] MSD_ID
  ATTRIBUTE aLocalID: [1,1] cvLocalID