<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/site-assets/xsl/database-description.xsl"?>
<Database name="main" version="1.0"
          xmlns:SVN="http://crystallography.net/xml/schema/svn-keywords"
          xmlns:RestfulDB="http://crystallography.net/xml/schema/restfuldb-metadata"
          xmlns="http://crystallography.net/xml/schema/relational-database"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://crystallography.net/xml/schema/relational-database http://crystallography.net/xml/schema/relational-database-restfuldb/relational-database-restfuldb_v0.1.0-rc.18.xsd">
  <Title>Protein-Ligand Binding Database</Title>
  <Authors>
    <AuthorName>Darius Lingė</AuthorName>
    <AuthorName>Marius Gedgaudas</AuthorName>
    <AuthorName>Andrius Merkys</AuthorName>
    <AuthorName>Vytautas Petrauskas</AuthorName>
    <AuthorName>Antanas Vaitkus</AuthorName>
    <AuthorName>Algirdas Grybauskas</AuthorName>
    <AuthorName>Vaida Paketurytė</AuthorName>
    <AuthorName>Asta Zubrienė</AuthorName>
    <AuthorName>Audrius Zakšauskas</AuthorName>
    <AuthorName>Aurelija Mickevičiūtė</AuthorName>
    <AuthorName>Joana Smirnovienė</AuthorName>
    <AuthorName>Lina Baranauskienė</AuthorName>
    <AuthorName>Edita Čapkauskaitė</AuthorName>
    <AuthorName>Virginija Dudutienė</AuthorName>
    <AuthorName>Ernestas Urniežius</AuthorName>
    <AuthorName>Aleksandras Konovalovas</AuthorName>
    <AuthorName>Egidijus Kazlauskas</AuthorName>
    <AuthorName>Saulius Gražulis</AuthorName>
    <AuthorName>Daumantas Matulis</AuthorName>
  </Authors>
  <SVN:Keywords>
    <SVN:Revision>$Revision: 38567 $</SVN:Revision>
    <SVN:Date>$Date: 2025-11-17 15:47:21 +0200 (Mon, 17 Nov 2025) $</SVN:Date>
    <SVN:Author>$Author: darius.linge $</SVN:Author>
    <SVN:URL>
      $URL: https://dbdd.ibt.lt/svn/matulis/BVTS_DB/trunk/website/doc/db/schemas/main-database-description-v0.17.0.xml $
    </SVN:URL>
    <SVN:Id>
      $Id: main-database-description-v0.17.0.xml 38567 2025-11-17 13:47:21Z darius.linge $
    </SVN:Id>
  </SVN:Keywords>
  <DatabaseDescription>
    Database of protein-ligand binding experimental results. 
  </DatabaseDescription>
  <DatabaseExplanation>
    Database of protein-ligand binding energetics. 
    Currently the database is focused on two protein groups, carbonic anhydrases 
    (CA) and Heat shock protein 90 (Hsp90) isozymes.
  </DatabaseExplanation>
  <DatabaseKeywords>
    <Keyword>Carbonic anhydrase</Keyword>
    <Keyword>Heat shock protein 90</Keyword>
    <Keyword>Sulfonamide</Keyword>
  </DatabaseKeywords>
<!-- Reagents and devices-->
  <Table name="buffer" is_view="true" readonly="true">
    <Title>Buffers</Title>
    <Description>Buffer composition</Description>
    <Explanation>Composition and other details of used buffers</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Buffer ID</Definition>
      <Explanation>Buffer identification number</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="uuid">
      <Title>UUID</Title>
      <Definition>Universally unique identifier</Definition>
      <Explanation>Universally unique identifier of experiment, may be generated by the server</Explanation>
      <SQLDataType>varchar(40)</SQLDataType>
      <RestfulDB:Role>uuid</RestfulDB:Role>
    </Field>
    <Field name="label" null="false">
      <Title>Buffer label</Title>
      <Definition>Label</Definition>
      <Explanation>Buffer label</Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
      <RestfulDB:Role>extkey</RestfulDB:Role>
      <RestfulDB:Suggestions>
        <RestfulDB:Suggestion>Pi-01</RestfulDB:Suggestion>
        <RestfulDB:Suggestion>Acetate-01</RestfulDB:Suggestion>
        <RestfulDB:Suggestion>MES-01</RestfulDB:Suggestion>
        <RestfulDB:Suggestion>Tris-01</RestfulDB:Suggestion>
      </RestfulDB:Suggestions>
    </Field>
    <Field name="system">
      <Title>Chemical type</Title>
      <Definition>Chemical type of buffer system</Definition>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="ph">
      <Title>pH</Title>
      <Definition>pH of the buffer</Definition>
      <Explanation>Nominal pH of the buffer system</Explanation>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="salt">
      <Title>Salt</Title>
      <Definition>Salt</Definition>
      <SQLDataType>varchar(32)</SQLDataType>
    </Field>
    <Field name="salt_concentration">
      <Title>Salt concentration</Title>
      <Definition>Salt concentration</Definition>
      <Explanation>Salt concentration in buffer.</Explanation>
      <Units>mM</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>User can add any notes about particular item if needed</Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last revision of the database (as recorded in the table 'revision')
        where this row was inserted or updated.
      </Definition>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`buffer`
    </Selection>
    <UniqueKey>
      <Field>label</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(label)s %(system)s %(ph)s %(salt)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="compound" is_view="true" readonly="true">
    <Title>Compounds</Title>
    <Description>Compound (ligand) properties</Description>
    <Explanation>Compounds (ligands) and their theoretical 
properties defined by chemical formula</Explanation>
      <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Compound ID</Definition>
      <Explanation>Identification number of chemical compound.</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="name">
      <Title>Name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of compound used in publications</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.name
      </Code>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="label" null="false">
      <Title>Cmpd label</Title>
      <Definition>Label of compound</Definition>
      <Explanation>Label of synthesized or purchased compound. Used for 
      internal documentation. Usable for database engines.</Explanation>
      <SQLDataType>varchar(512)</SQLDataType>
      <RestfulDB:Role>extkey</RestfulDB:Role>
    </Field>
    <Field name="author_id">
      <Title>Author</Title>
      <Definition>
        The person who synthesized and/or provided the compound
      </Definition>
      <SQLDataType>varchar(256)</SQLDataType>      
    </Field>
    <Field name="formula">
      <Title>Formula</Title>
      <Definition>Formula</Definition>
      <Explanation>Chemical formula</Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Image representing structure of compound</Explanation>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="iupac_name">
      <Title>IUPAC Name</Title>
      <Definition>IUPAC Name</Definition>
      <Explanation>Name of compound following International Union of Pure and 
      Applied Chemistry naming rules.</Explanation>
      <SQLDataType>varchar(512)</SQLDataType>
    </Field>
    <Field name="generic_name">
      <Title>Generic name</Title>
      <Definition>Generic name of compound</Definition>
      <Explanation>Another possible name</Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="mol_weight"> 
      <Title>Molecular weight</Title>
      <Definition>Molecular weight</Definition>
      <Explanation>Molecular weight of compound by chemical formula</Explanation>
      <Units>g/mol</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="r_group">
      <Title>R-group</Title>
      <Definition>Side group</Definition>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="substitutes">
      <Title>Substitutes</Title>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="lead">
      <Title>Lead</Title>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="smiles">
      <Title>SMILES</Title>
      <Definition>SMILES</Definition>
      <Explanation>Simplified molecular-input line-entry system</Explanation>
      <SQLDataType>varchar(256)</SQLDataType>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Code language="SQL" dialect="MySQL">
        c.notes
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision')
        where this row was inserted or updated.
      </Definition>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        c.revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`compound` AS c 
      WHERE c.public = 1
    </Selection>
    <UniqueKey>
      <Field>label</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(name)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="protein" is_view="true" readonly="true">
    <Title>Proteins</Title>
    <Description>Protein properties and origins</Description>
    <Explanation>Used proteins properties and origins</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Identification number</Definition>
      <Explanation>Identification number of protein.</Explanation>
      <Code language="SQL" dialect="MySQL">
        p.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="name">
      <Title>Name</Title>
      <Definition>Class of protein</Definition>
      <Explanation>Name of carbonic anhydrase isozymes as represented in key 
      publications. With Roman numerals.</Explanation>
      <Code language="SQL" dialect="MySQL">
        p.name
      </Code>
      <SQLDataType>varchar(32)</SQLDataType>
    </Field>
    <Field name="label" null="false">
      <Title>Protein label</Title>
      <Definition>label of protein</Definition>
      <Explanation>label of carbonic anhydrase with Arabic numerals. Used for 
      internal documentation. Usable for database engines.</Explanation>
      <Code language="SQL" dialect="MySQL">
        p.label
      </Code>
      <SQLDataType>varchar(512)</SQLDataType>
      <RestfulDB:Role>extkey</RestfulDB:Role>
    </Field>
    <Field name="primary_group_label">
      <Title>Primary group</Title>
      <Definition>Primary group</Definition>
      <Explanation>Label of protein group for database selection queries</Explanation>
      <Code language="SQL" dialect="MySQL">
        pbv.primary_group_label
      </Code>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="organism">
      <Title>Origin organism</Title>
      <Definition>Origin organism</Definition>
      <Explanation>Protein origin organism</Explanation>
      <Code language="SQL" dialect="MySQL">
        concat(o.name, ' (', o.species, ')')
      </Code>
      <SQLDataType>varchar(255)</SQLDataType>
    </Field>
    <Field name="uniprot">
      <Title>UniProt</Title>
      <Definition>UniProt number</Definition>
      <Explanation>UniProt number and link to the database record</Explanation>
      <SQLDataType>varchar(256)</SQLDataType>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://www.uniprot.org/uniprot/" primary="true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Field name="sequence">
      <Title>Sequence</Title>
      <Definition>Sequence</Definition>
      <Explanation>Amino acid sequence of the protein in 1-letter notation.</Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="molecular_weight">
      <Title>Mol. weight</Title>
      <Definition>Molecular weigth</Definition>
      <Explanation>Protein molecular weigth</Explanation>
      <Units>g/mol</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="isoelectric_point">
      <Title>pI</Title>
      <Definition>Isoelectric point</Definition>
      <Explanation>Isoelectric point of the protein</Explanation>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>Notes about particular item</Explanation>
      <Code language="SQL" dialect="MySQL">
        p.notes
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision')
        where this row was inserted or updated.
      </Definition>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        p.revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`protein` AS p
        LEFT JOIN `BVTS`.`protein_batch_view` AS pbv ON p.id = pbv.protein_id
        LEFT JOIN `BVTS`.`organism` AS o ON o.id = p.organism_id
      WHERE `p`.`public` = 1
      GROUP BY p.id
    </Selection>
    <UniqueKey>
      <Field>label</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(name)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="compound_batch" is_view="true" readonly="true">
    <Title>Compound batches</Title>
    <Description>Properties of synthesized chemical compound batches</Description>
    <Explanation>Experimentally measured properties of synthesized chemical compound batches</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Compound (ligand) batch</Definition>
      <Explanation>Identification number of compound batch</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="uuid">
      <Title>UUID</Title>
      <Definition>Universally unique identifier</Definition>
      <Explanation>Universally unique identifier of compound batch</Explanation>
      <SQLDataType>varchar(40)</SQLDataType>
      <RestfulDB:Role>uuid</RestfulDB:Role>
    </Field>
    <Field name="compound_batch_label">
      <Title>Cmpd batch label</Title>
      <Definition>Label</Definition>
      <Explanation>Compound batch label</Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
      <RestfulDB:Role>extkey</RestfulDB:Role>
    </Field>
    <Field name="name">
      <Title>Cmpd name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>
        Name of synthesized or used compound as represented in publications. 
      </Explanation>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="author_id">
      <Title>Author</Title>
      <Definition>Author</Definition>
      <Explanation>Compound batch producer or supplier.</Explanation>
      <SQLDataType>varchar(256)</SQLDataType>      
    </Field>
    <Field name="date">
      <Title>Date</Title>
      <Definition>Date</Definition>
      <Explanation>Date of preparation</Explanation>
      <SQLDataType>date</SQLDataType>
      <RegularExpression>\d{4}-\d{2}-\d{2}</RegularExpression>
      <RestfulDB:Role>cdate</RestfulDB:Role>
      </Field>
    <Field name="synthesis_path">
      <Title>Synthesis path</Title>
      <Definition>Synthesis path</Definition>
      <Explanation>Detailed description of compound synthesis path</Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="yield">
      <Title>Yield</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Yield</Definition>
      <Explanation>Percent yield</Explanation>
      <Units>%</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="melting_point_start">
      <Title><i>T</i><sub>m</sub> start</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Melting point start</Definition>
      <Explanation>
        Melting point if defined as single number 
        or start of observed range. 
      </Explanation>
      <Units>°C</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="melting_point_end">
      <Title><i>T</i><sub>m</sub> end</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Melting point end</Definition>
      <Explanation>
        End of melting point range if defined.
      </Explanation>
      <Units>°C</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="purification">
      <Title>Purification</Title>
      <Definition>Purification</Definition>
      <Explanation>Purification method</Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="mass_spectra"> 
      <Title>Mass spectra</Title>
      <Definition>Mass spectra</Definition>
      <Explanation>Mass spectra summary file/picture</Explanation>
      <SQLDataType>mediumblob</SQLDataType>
    </Field>
    <Field name="nmr_1h">
      <Title><sup>1</sup>H NMR</Title>
      <Definition><sup>1</sup>H NMR</Definition>
      <Explanation>Nuclear magnetic resonance <sup>1</sup>H</Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="nmr_13c">
      <Title><sup>13</sup>C NMR</Title>
      <Definition><sup>13</sup>C NMR</Definition>
      <Explanation>Nuclear magnetic resonance 13C</Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="ir_and_other_spectra">
      <Title>IR and other spectra</Title>
      <Definition>IR and other spectra</Definition>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>Extra information not included in other fields</Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="compound_label">
      <Title>Cmpd label</Title>
      <Definition>Label of compound</Definition>
      <Explanation>Label of synthesized  or purchased compound. Used for 
      internal documentation. Use for search.</Explanation>
      <SQLDataType>varchar(64)</SQLDataType>
      </Field>
    <Field name="compound_id">
      <Title>Compound</Title>
      <Definition>Chemical compound</Definition>
      <Explanation>Chemical compound ID</Explanation>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="formula">
      <Title>Formula</Title>
      <Definition>Formula</Definition>
      <Explanation>Chemical formula as in example C17H18N2O4</Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="smiles">
      <Title>SMILES</Title>
      <Definition>SMILES</Definition>
      <Explanation>Simplified molecular-input line-entry system</Explanation>
      <SQLDataType>varchar(256)</SQLDataType>
    </Field>
    <Field name="iupac_name">
      <Title>IUPAC Name</Title>
      <Definition>IUPAC Name</Definition>
      <Explanation>Name of compound following International Union of Pure and 
      Applied Chemistry naming rules.</Explanation>
      <SQLDataType>varchar(512)</SQLDataType>
    </Field>
    <Field name="generic_name">
      <Title>Generic name</Title>
      <Definition>Generic name of compound</Definition>
      <Explanation>Another possible name</Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>
        Image representing structure of compound.
        Preferably, SVG format.
      </Explanation>
      <SQLDataType>mediumblob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision')
        where this row was inserted or updated.
      </Definition>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL" dialect="MySQL">
      FROM `BVTS`.`compound_batch_view` WHERE public = 1
    </Selection>
    <UniqueKey>
      <Field>label</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(compound_batch_label)s (%(name)s)</RestfulDB:FKRepresentation>
  </Table>
  <Table name="protein_batch" is_view="true" readonly="true">
    <Title>Protein batches</Title>
    <Description>Purified protein batches</Description>
    <Explanation>Purified protein batches properties</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Identification number</Definition>
      <Explanation>Identification number of protein.</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="uuid">
      <Title>UUID</Title>
      <Definition>Universally unique identifier</Definition>
      <Explanation>Universally unique identifier of protein batch</Explanation>
      <SQLDataType>varchar(40)</SQLDataType>
      <RestfulDB:Role>uuid</RestfulDB:Role>
    </Field>
    <Field name="plasmid">
      <Title>Plasmid</Title>
      <Definition>Plasmid</Definition>
      <Explanation>Plasmid code</Explanation>
      <SQLDataType>varchar(32)</SQLDataType>
    </Field>
    <Field name="purification_date">
      <Title>Purification date</Title>
      <Definition>Purification date</Definition>
      <SQLDataType>date</SQLDataType>
    </Field>
    <Field name="primary_group_label">
      <Title>Primary group</Title>
      <Definition>Primary group</Definition>
      <Explanation>Label of protein group for database selection queries</Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="protein_id">
      <Title>Protein</Title>
      <Definition>Protein name.</Definition>
      <ForeignKey>
        <ReferencedTable>protein</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="author_id">
      <Title>Author</Title>
      <Definition>Author</Definition>
      <Explanation>Author ID</Explanation>
      <SQLDataType>varchar(256)</SQLDataType>      
    </Field>
    <Field name="protein_method_id">
      <Title>Method</Title>
      <Definition>Method</Definition>
      <Explanation>Used method ID</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
    </Field>
    <Field name="mw_ms">
      <Title>MW by MS</Title>
      <Definition>MW by MS</Definition>
      <Explanation>Molecular weigth determined by Mass Spectrometry</Explanation>
      <Units>g/mol</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="protein_batch_label">
      <Title>Protein batch label</Title>
      <Definition>Label</Definition>
      <Explanation>Protein batch label</Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
      <RestfulDB:Role>extkey</RestfulDB:Role>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>Additional information about protein batch</Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="protein_label">
      <Title>Protein label</Title>
      <Definition>Protein label</Definition>
      <Explanation>Label of protein</Explanation>
      <ForeignKey>
        <ReferencedTable>protein</ReferencedTable>
        <ReferencedField>label</ReferencedField>
      </ForeignKey>
      <SQLDataType>varchar(16)</SQLDataType>
    </Field>
    <Field name="name">
      <Title>Name</Title>
      <Definition>Class of protein</Definition>
      <Explanation>
        Name of protein as represented in key 
        publications. For CA isozymes, use Roman numerals.
      </Explanation>
      <SQLDataType>varchar(32)</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision')
        where this row was inserted or updated.
      </Definition>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL" dialect="MySQL">
      FROM `BVTS`.`protein_batch_view` WHERE public = 1
    </Selection>
    <UniqueKey>
      <Field>protein_batch_label</Field>
    </UniqueKey>
    <UniqueKey>
      <Field>uuid</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(protein_batch_label)s (%(name)s)</RestfulDB:FKRepresentation>
  </Table>
<!-- Equipment -->
  <Table name="device" is_view="true" readonly="true">
    <Title>Devices</Title>
    <Description>Instruments used for measurements</Description>
    <Explanation>Instruments used for measurements</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Device ID</Definition>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="device_type" null="false">
      <Title>Device type</Title>
      <Definition>Type of device by used investigation method</Definition>
      <Explanation>Type of device by currently used investigation methods: 
Fluorescent Thermal Shift Assay (FTSA, TSA, DSF, TF), 
Isothermal Titration Calorimetry (ITC), 
Stopped-flow Assay (SFA), 
Surface Plasmon Resonance (SPR), 
X-ray crystallography (X-ray),
UV/VIS Spectrophotometer (SFM),
Pressure Spectrophotometer (PSFM),
Differential Scanning Calorimetry (DSC).
</Explanation>
      <SQLDataType>enum('FTSA','ITC','SFA','SPR','X-ray','SFM','PSFM','DSC')</SQLDataType>
      <Enumeration>
        <EnumerationValue>FTSA</EnumerationValue>
        <EnumerationValue>ITC</EnumerationValue>
        <EnumerationValue>SFA</EnumerationValue>
        <EnumerationValue>SPR</EnumerationValue>
        <EnumerationValue>X-ray</EnumerationValue>
        <EnumerationValue>SFM</EnumerationValue>
        <EnumerationValue>PSFM</EnumerationValue>
        <EnumerationValue>DSC</EnumerationValue>
      </Enumeration>
    </Field>
    <Field name="manufacturer">
      <Title>Manufacturer</Title>
      <Definition>Manufacturer</Definition>
      <Explanation>Name of manufacturer at device made time.</Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="model">
      <Title>Model</Title>
      <Definition>Model of device in manufacturer terms</Definition>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>Expanded information about instrument</Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`device` WHERE public = 1
    </Selection>
    <UniqueKey>
      <Field>manufacturer</Field>
      <Field>model</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(manufacturer)s %(model)s</RestfulDB:FKRepresentation>
  </Table>
<!-- Files and relations -->
  <Table name="file" is_view="true" readonly="true">
    <Title>Files</Title>
    <Description>Data files and documents</Description>
    <Explanation>Files representing collected data, data analysis, compounds synthesis and other</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>File ID</Definition>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="uuid">
      <Title>UUID</Title>
      <Definition>UUID</Definition>
      <Explanation>Universally unique identifier of file</Explanation>
      <SQLDataType>varchar(40)</SQLDataType>
      <RestfulDB:Role>uuid</RestfulDB:Role>
    </Field>
    <Field name="uri">
      <Title>URL</Title>
      <Definition>URL</Definition>
      <Explanation>Uniform Resource Locator (web address) of file access.</Explanation>
      <SQLDataType>text</SQLDataType>
      <RestfulDB:Role>url</RestfulDB:Role>
    </Field>
    <Field name="file_name">
      <Title>File name</Title>
      <Definition>File name</Definition>
      <SQLDataType>varchar(255)</SQLDataType>
      <RestfulDB:Role target_field="content">filename</RestfulDB:Role>
    </Field>
    <Field name="content">
      <Title>File content</Title>
      <Definition>File content</Definition>
      <Explanation>File content, upload the file.</Explanation>
      <SQLDataType>longblob</SQLDataType>
      <RestfulDB:Role>file</RestfulDB:Role>
    </Field>
    <Field name="md5sum">
      <Title>MD5 sum</Title>
      <Definition>md5 sum of file content</Definition>
      <SQLDataType>varchar(32)</SQLDataType>
      <RestfulDB:Role target_field="content">md5</RestfulDB:Role>
    </Field>
    <Field name="sha256sum">
      <Title>SHA-256 sum</Title>
      <Definition>Sha256 sum of file content</Definition>
      <SQLDataType>varchar(64)</SQLDataType>
      <RestfulDB:Role target_field="content">sha256</RestfulDB:Role>
    </Field>
    <Field name="mimetype">
      <Title>MIME</Title>
      <Definition>Media type</Definition>
      <SQLDataType>varchar(128)</SQLDataType>
      <RestfulDB:Role target_field="content">mimetype</RestfulDB:Role>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>Expanded information about file</Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`file` WHERE public = 1
    </Selection>
    <UniqueKey>
      <Field>uuid</Field>
    </UniqueKey>
    <UniqueKey>
      <Field>file_name</Field>
    </UniqueKey>
    <UniqueKey>
      <Field>sha256sum</Field>
      <Field>md5sum</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(uri)s %(file_name)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="itc_file" is_view="true" readonly="true">
    <Title>Relations experiment_itc-file</Title>
    <Description>ITC experiments and files relations</Description>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>ID</Definition>
      <Code language="SQL" dialect="MySQL">
        itcf.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="file_id">
      <Title>File</Title>
      <Definition>File in corresponding table</Definition>
      <ForeignKey>
        <ReferencedTable>file</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="experiment_itc_id">
      <Title>ITC experiment</Title>
      <Definition>ITC experiment in corresponding table</Definition>
      <ForeignKey>
        <ReferencedTable>experiment_itc</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>Notes about particular item</Explanation>
      <Code language="SQL" dialect="MySQL">
        itcf.notes
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        itcf.revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`itc_file` AS itcf
        JOIN `BVTS`.`file` AS f ON f.id = itcf.file_id
        JOIN `BVTS`.`experiment_itc_protein_compound_view` AS itc ON itc.id = itcf.experiment_itc_id
      WHERE (f.public = 1) AND (itc.public = 1)
    </Selection>
    <UniqueKey>
      <Field>file_id</Field>
      <Field>experiment_itc_id</Field>
    </UniqueKey>
  </Table>
  <Table name="tsa_file" is_view="true" readonly="true">
    <Title>Relations experiment_tsa-file</Title>
    <Description>FTSA experiments and files relations</Description>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>ID</Definition>
      <Code language="SQL" dialect="MySQL">
        tsaf.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="file_id">
      <Title>File</Title>
      <Definition>File in corresponding table</Definition>
      <ForeignKey>
        <ReferencedTable>file</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="experiment_tsa_id">
      <Title>FTSA experiment</Title>
      <Definition>FTSA experiment in corresponding table</Definition>
      <ForeignKey>
        <ReferencedTable>experiment_tsa</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>Notes about particular item</Explanation>
      <Code language="SQL" dialect="MySQL">
        tsaf.notes
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        tsaf.revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`tsa_file` AS tsaf
        JOIN `BVTS`.`file` AS f ON f.id = tsaf.file_id
        JOIN `BVTS`.`experiment_tsa_protein_compound_view` AS tsa ON tsa.id = tsaf.experiment_tsa_id
      WHERE (f.public = 1) AND (tsa.public = 1)
    </Selection>
    <UniqueKey>
      <Field>file_id</Field>
      <Field>experiment_tsa_id</Field>
    </UniqueKey>
  </Table>
  <Table name="spr_file" is_view="true" readonly="true">
    <Title>Relations experiment_spr-file</Title>
    <Description>SPR experiments and files relations</Description>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>ID</Definition>
      <Code language="SQL" dialect="MySQL">
        sprf.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="file_id">
      <Title>File</Title>
      <Definition>File in corresponding table</Definition>
      <ForeignKey>
        <ReferencedTable>file</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="experiment_spr_id">
      <Title>SPR experiment</Title>
      <Definition>SPR experiment in corresponding table</Definition>
      <ForeignKey>
        <ReferencedTable>experiment_spr</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>Notes about particular item</Explanation>
      <Code language="SQL" dialect="MySQL">
        sprf.notes
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        sprf.revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`spr_file` AS sprf
        JOIN `BVTS`.`file` AS f ON f.id = sprf.file_id
        JOIN `BVTS`.`experiment_spr_protein_compound_view` AS spr ON spr.id = sprf.experiment_spr_id
      WHERE (f.public = 1) AND (spr.public = 1)
    </Selection>
    <UniqueKey>
      <Field>file_id</Field>
      <Field>experiment_spr_id</Field>
    </UniqueKey>
  </Table>
  <Table name="sfa_file" is_view="true" readonly="true">
    <Title>Relations experiment_sfa-file</Title>
    <Description>SFA experiments and files relations</Description>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>ID</Definition>
      <Code language="SQL" dialect="MySQL">
        sfaf.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="file_id">
      <Title>File</Title>
      <Definition>File in corresponding table</Definition>
      <ForeignKey>
        <ReferencedTable>file</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="experiment_sfa_id">
      <Title>SFA experiment</Title>
      <Definition>SFA experiment in corresponding table</Definition>
      <ForeignKey>
        <ReferencedTable>experiment_sfa</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>Notes about particular item</Explanation>
      <Code language="SQL" dialect="MySQL">
        sfaf.notes
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        sfaf.revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`sfa_file` AS sfaf
        JOIN `BVTS`.`file` AS f ON f.id = sfaf.file_id
        JOIN `BVTS`.`experiment_sfa_protein_compound_view` AS sfa ON sfa.id = sfaf.experiment_sfa_id
      WHERE (f.public = 1) AND (sfa.public = 1)
    </Selection>
    <UniqueKey>
      <Field>file_id</Field>
      <Field>experiment_sfa_id</Field>
    </UniqueKey>
  </Table>
<!-- Publications -->
  <Table name="publication" is_view="true" readonly="true">
    <Title>Publications</Title>
    <Description>The list contains publications used as PLBD data sources</Description>
    <Explanation>The list of publications, primary sources of PLBD data</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Publication ID</Definition>
      <Explanation>Identification number for publication.</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="doi">
      <Title>DOI</Title>
      <Definition>DOI of publication</Definition>
      <Explanation>Digital Object Identifier</Explanation>
      <SQLDataType>varchar(256)</SQLDataType>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://doi.org/" primary="true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Field name="title">
      <Title>Title</Title>
      <Definition>Title of publication</Definition>
      <Explanation>Title of article, book chapter, etc.</Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="year">
      <Title>Year</Title>
      <Definition>Year of publication</Definition>
      <Explanation>Year of publication</Explanation>
      <SQLDataType>varchar(4)</SQLDataType>
    </Field>
    <Field name="publication_type">
      <Title>Publication type</Title>
      <Definition>Type of publication</Definition>
      <Explanation>Type of publication. Possible values: article methods, 
article synthesis, review, book chapter, patent, etc.</Explanation>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="publication_status">
      <Title>Publication status</Title>
      <Definition>Status of publication</Definition>
      <Explanation>Status of publication. Possible values: published, writing, 
planned, rejected, etc.</Explanation>
      <SQLDataType>varchar(32)</SQLDataType>
    </Field>
    <Field name="label" null="false">
      <Title>Label</Title>
      <Definition>Label</Definition>
      <Explanation>Publication label</Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
      <RestfulDB:Role>extkey</RestfulDB:Role>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>Expanded information about publication</Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`publication` WHERE public = 1
    </Selection>
    <UniqueKey>
      <Field>label</Field>
    </UniqueKey>
    <UniqueKey>
      <Field>doi</Field>
      <Field>citation_key</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(label)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="compound_publication" is_view="true" readonly="true">
    <Title>Relations compound-publication</Title>
    <Description>Compounds and publications relations</Description>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>ID</Definition>
      <Code language="SQL" dialect="MySQL">
        cp.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="compound_id">
      <Title>Compound</Title>
      <Definition>Compound in corresponding table</Definition>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="publication_id">
      <Title>Publication</Title>
      <Definition>Publication in corresponding table</Definition>
      <ForeignKey>
        <ReferencedTable>publication</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="published_code">
      <Title>Code name</Title>
      <Definition>Published code name</Definition>
      <Explanation>Code name of compound used in particular publication</Explanation>
      <SQLDataType>varchar(255)</SQLDataType>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>Notes about particular item</Explanation>
      <Code language="SQL" dialect="MySQL">
        cp.notes
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        cp.revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`compound_publication` AS cp
        JOIN `BVTS`.`compound` AS c ON c.id = cp.compound_id
        JOIN `BVTS`.`publication` AS p ON p.id = cp.publication_id
      WHERE (p.public = 1) AND (c.public = 1)
    </Selection>
    <UniqueKey>
      <Field>publication_id</Field>
      <Field>compound_id</Field>
    </UniqueKey>
  </Table>
  <Table name="tsa_publication" is_view="true" readonly="true">
    <Title>Relations experiment_tsa-publication</Title>
    <Description>FTSA experiments and publications relations</Description>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>ID</Definition>
      <Code language="SQL" dialect="MySQL">
        tsap.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="publication_id">
      <Title>Publication</Title>
      <Definition>Publication in corresponding table</Definition>
      <ForeignKey>
        <ReferencedTable>publication</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="experiment_tsa_id">
      <Title>FTSA experiment</Title>
      <Definition>FTSA experiment in corresponding table</Definition>
      <ForeignKey>
        <ReferencedTable>experiment_tsa</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>Notes about particular item</Explanation>
      <Code language="SQL" dialect="MySQL">
        tsap.notes
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        tsap.revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`tsa_publication` AS tsap
        JOIN `BVTS`.`publication` AS p ON p.id = tsap.publication_id
        JOIN `BVTS`.`experiment_tsa_protein_compound_view` AS tsa ON tsa.id = tsap.experiment_tsa_id
      WHERE (p.public = 1) AND (tsa.public = 1)
    </Selection>
    <UniqueKey>
      <Field>publication_id</Field>
      <Field>experiment_tsa_id</Field>
    </UniqueKey>
  </Table>
<!-- Molecular structure -->
  <Table name="crystal_structure" is_view="true" readonly="true">
    <Title>Crystal structures</Title>
    <Description>X-ray crystallographic structures of protein-ligand complexes</Description>
    <Explanation>X-ray crystallographic structures of protein-ligand complexes</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Identification number</Definition>
      <Explanation>Identification number of each entered data row.</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="uuid">
      <Title>UUID</Title>
      <Definition>Universally unique identifier</Definition>
      <Explanation>
        Universally unique identifier of X-ray crystallographic structure.
      </Explanation>
      <SQLDataType>varchar(40)</SQLDataType>
      <RestfulDB:Role>uuid</RestfulDB:Role>
    </Field>
    <Field name="name">
      <Title>Name</Title>
      <Definition>
        Name of crystal structure
      </Definition>
      <Explanation>
        Name of crystal structure in external repository
      </Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="label" null="false">
      <Title>Label</Title>
      <Definition>Label</Definition>
      <Explanation>
        Crystal structure label
      </Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
      <RestfulDB:Role>extkey</RestfulDB:Role>
    </Field>
    <Field name="pdb_id">
      <Title>PDB ID</Title>
      <Definition>PDB code</Definition>
      <Explanation>Protein databank code</Explanation>
      <SQLDataType>varchar(15)</SQLDataType>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://www.rcsb.org/structure/" primary="true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Field name="author_id">
      <Title>Performed by</Title>
      <Definition>Experimenter</Definition>
      <Explanation>
        Name of the person who determined the crystal structure. 
      </Explanation>
      <SQLDataType>varchar(256)</SQLDataType>
    </Field>
    <Field name="device_id">
      <Title>Device</Title>
      <Definition>Instrument name.</Definition>
      <Explanation>Instrument name.</Explanation>
      <ForeignKey>
        <ReferencedTable>device</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>varchar(256)</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="compound_batch_id">
      <Title>Cmpd batch</Title>
      <Definition>Compound (ligand) batch.</Definition>
      <Explanation>Compound (ligand) batch.</Explanation>
      <ForeignKey>
        <ReferencedTable>compound_batch</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="protein_batch_id">
      <Title>Protein batch</Title>
      <Definition>Protein batch.</Definition>
      <Explanation>Protein batch.</Explanation>
      <ForeignKey>
        <ReferencedTable>protein_batch</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="resolution">
      <Title>Resolution</Title>
      <Definition>Resolution of structure determination</Definition>
      <Explanation>Resolution of structure determination</Explanation>
      <Units>Å</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="r_cryst">
      <Title>R<sub>cryst</sub></Title>
      <Definition>Crystallography R-factor</Definition>
      <Explanation>R-factor, measure of the agreement between the crystallographic model 
and the experimental X-ray diffraction data</Explanation>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %.3f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="r_free">
      <Title>R<sub>free</sub></Title>
      <Definition>Free R-factor</Definition>
      <Explanation>Crystallography R-factor applied to a small subset of reflections</Explanation>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %.3f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="completeness">
      <Title>Compl.</Title>
      <Definition>Completeness</Definition>
      <Explanation>Completeness, the coverage of all theoretically possible 
unique reflections within the measured data set</Explanation>
      <Units>%</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="multiplicity">
      <Title>N<sub>meas</sub></Title>
      <Definition>Reflection multiplicity</Definition>
      <Explanation>Reflection multiplicity</Explanation>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %4.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="reliability" null="false">
      <Title>Reliability</Title>
      <Definition>Reliability of the experiment</Definition>
      <Explanation>
        Arbitrary factor used to determine the reliability of experimental data. The range of 0-100 is used. Typical properly performed and analyzed experiments are assigned a value of 90.
      </Explanation>
      <SQLDataType>int unsigned</SQLDataType>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>
        User can add any notes about particular data if needed.
      </Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision')
        where this row was inserted or updated.
      </Definition>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`crystal_structure` 
      WHERE public = 1
    </Selection>
    <UniqueKey>
      <Field>uuid</Field>
    </UniqueKey>
    <UniqueKey>
      <Field>label</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(label)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="structure_thermodynamics" is_view="true" readonly="true">
    <Title>Structures-binding relations</Title>
    <Description>X-ray crystallographic structures and binding thermodynamics</Description>
    <Explanation>
      X-ray crystallographic structures list with corresponding binding 
      thermodynamical parameters, both observed and intrinsic 
    </Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Identification number</Definition>
      <Explanation>Identification number of each entered data row.</Explanation>
      <Code language="SQL" dialect="MySQL">
        cs.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="uuid">
      <Title>UUID</Title>
      <Definition>Universally unique identifier</Definition>
      <Explanation>
        Universally unique identifier of X-ray crystallographic structure.
      </Explanation>
      <Code language="SQL" dialect="MySQL">
        cs.uuid
      </Code>
      <SQLDataType>varchar(40)</SQLDataType>
      <RestfulDB:Role>uuid</RestfulDB:Role>
    </Field>
    <Field name="name">
      <Title>Name</Title>
      <Definition>Name of crystal structure</Definition>
      <Explanation>Name of crystal structure in external repository</Explanation>
      <Code language="SQL" dialect="MySQL">
        cs.name
      </Code>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="label" null="false">
      <Title>Label</Title>
      <Definition>Label</Definition>
      <Explanation>
        Crystal structure label
      </Explanation>
      <Code language="SQL" dialect="MySQL">
        cs.label
      </Code>
      <SQLDataType>varchar(128)</SQLDataType>
      <RestfulDB:Role>extkey</RestfulDB:Role>
    </Field>
    <Field name="pdb_id">
      <Title>PDB ID</Title>
      <Definition>PDB code</Definition>
      <Explanation>Protein databank code</Explanation>
      <SQLDataType>varchar(15)</SQLDataType>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://www.rcsb.org/structure/" primary="true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Field name="compound_batch_id">
      <Title>Cmpd batch</Title>
      <Definition>Compound (ligand) batch.</Definition>
      <Explanation>Compound (ligand) batch.</Explanation>
      <ForeignKey>
        <ReferencedTable>compound_batch</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        cs.compound_batch_id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="compound_id">
      <Title>Cmpd ID</Title>
      <Definition>Compound ID</Definition>
      <Explanation>Compound (ligand).</Explanation>
      <Code language="SQL" dialect="MySQL">
        cbv.compound_id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://plbd.org/private/db/BVTS/compound/" primary="true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Field name="compound_name">
      <Title>Cmpd name</Title>
      <Definition>Compound name</Definition>
      <Explanation>Compound (ligand) name</Explanation>
      <Code language="SQL" dialect="MySQL">
        cbv.name
      </Code>
      <SQLDataType>varchar(255)</SQLDataType>
    </Field>
    <Field name="protein_batch_id">
      <Title>Protein batch</Title>
      <Definition>Protein batch.</Definition>
      <Explanation>Protein batch.</Explanation>
      <ForeignKey>
        <ReferencedTable>protein_batch</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        cs.protein_batch_id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="protein_id">
      <Title>Protein ID</Title>
      <Definition>Protein ID</Definition>
      <Explanation>Protein ID</Explanation>
      <Code language="SQL" dialect="MySQL">
        pbv.protein_id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://plbd.org/private/db/BVTS/protein/" primary="true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Field name="protein_name">
      <Title>Protein name</Title>
      <Definition>Protein name</Definition>
      <Explanation>Protein name</Explanation>
      <Code language="SQL" dialect="MySQL">
        pbv.name
      </Code>
      <SQLDataType>varchar(255)</SQLDataType>
    </Field>  
    <Field name="protein_group">
      <Title>Protein group</Title>
      <Definition>Protein group name</Definition>
      <Explanation>Protein group name obtained from particular protein `primary_group_label` field</Explanation>
      <Code language="SQL" dialect="MySQL">
        IFNULL(pg.name, 'NiG')
      </Code>
      <SQLDataType>varchar(255)</SQLDataType>
    </Field>  
    <Field name="resolution">
      <Title>Resolution</Title>
      <Definition>Resolution of structure determination</Definition>
      <Explanation>Resolution of structure determination</Explanation>
      <Units>Å</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="t_tsa">
      <Title><i>T</i><sub>TSA</sub></Title>
      <Definition>Temperature for obtaining intrinsic Gibbs energy</Definition>
      <Units>°C</Units>
      <Code language="SQL" dialect="MySQL">
        etsa.temperature
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="kd_obs">
      <Title><i>K</i><sub>d,obs,TSA</sub></Title>
      <Definition>Observed Kd</Definition>
      <Explanation>Observed dissociation constant from TSA experiments</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        (1 / etsa.kb_obs)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="dbg_obs">
      <Title>Δ<i>G</i><sub>obs,TSA</sub></Title>
      <Definition>Observed ΔGb value</Definition>
      <Explanation>Observed standard Gibbs energy change on binding from TSA experiments</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        (-8.31446 * (etsa.temperature + 273.15) * ln(etsa.kb_obs) / 1000)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="kd_int">
      <Title><i>K</i><sub>d,int,TSA</sub></Title>
      <Definition>Intrinsic Kd</Definition>
      <Explanation>Intrinsic dissociation constant from TSA experiments</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        1 / bitsa.kb_int
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="dbg_int">
      <Title>Δ<i>G</i><sub>int,TSA</sub></Title>
      <Definition>Intrinsic ΔGb value</Definition>
      <Explanation>Intrinsic standard Gibbs energy change on binding.</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        bitsa.dbg_int
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="t_itc">
      <Title><i>T</i><sub>ITC</sub></Title>
      <Definition>Temperature for obtaining intrinsic Gibbs energy</Definition>
      <Units>°C</Units>
      <Code language="SQL" dialect="MySQL">
        biitc.temperature
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="dbh_int">
      <Title>Δ<i>H</i><sub>int,ITC</sub></Title>
      <Definition>Intrinsic ΔHb value</Definition>
      <Explanation>Intrinsic enthalpy on binding.</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        biitc.dbh_int
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>
        User can add any notes about particular data if needed.
      </Explanation>
      <Code language="SQL" dialect="MySQL">
        cs.notes
      </Code>  
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision')
        where this row was inserted or updated.
      </Definition>
      <Code language="SQL" dialect="MySQL">
            GREATEST(cs.revision_id, IFNULL(cbv.revision_id, 0), IFNULL(pbv.revision_id, 0)) 
      </Code>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://plbd.org/private/db/BVTS/revision/" primary="true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Selection language="SQL">
      FROM
          `BVTS`.`crystal_structure` `cs`
              LEFT JOIN
          `BVTS`.`compound_batch_view` `cbv` ON (`cs`.`compound_batch_id` = `cbv`.`id`)
              LEFT JOIN
          `BVTS`.`protein_batch_view` `pbv` ON (`cs`.`protein_batch_id` = `pbv`.`id`)
              LEFT JOIN
          `BVTS`.`protein_group` `pg` ON (`pbv`.`primary_group_label` = `pg`.`label`)
              LEFT JOIN
          (SELECT 
              best_int_tsa.id AS id,
              best_int_tsa.compound_id AS compound_id,
              POW(10, AVG(LOG10(best_int_tsa.kb_int))) AS kb_int,
              AVG(best_int_tsa.dbg_int) AS dbg_int,
              best_int_tsa.temperature AS temperature,
              COUNT(best_int_tsa.id) AS count,
              pgp.protein_group_id AS protein_group_id,
              pg.label AS pg_label
          FROM
              `BVTS`.`best_intrinsic_tsa` AS best_int_tsa
          LEFT JOIN `BVTS`.`protein_group_protein` AS pgp ON best_int_tsa.protein_id = pgp.protein_id
          LEFT JOIN `BVTS`.`protein_group` AS pg ON pgp.protein_group_id = pg.id
          WHERE best_int_tsa.public = 1
          GROUP BY compound_id , protein_group_id , temperature) AS `bitsa` ON (`bitsa`.`pg_label` = `pbv`.primary_group_label
              AND `bitsa`.`compound_id` = `cbv`.`compound_id`)
              LEFT JOIN
          (SELECT 
              best_int_itc.id AS id,
              best_int_itc.compound_id AS compound_id,
              AVG(best_int_itc.dbh_int) AS dbh_int,
              best_int_itc.temperature AS temperature,
              COUNT(best_int_itc.id) AS count,
              pgp.protein_group_id AS protein_group_id,
              pg.label AS pg_label
          FROM
              `BVTS`.`best_intrinsic_itc` AS best_int_itc
          LEFT JOIN `BVTS`.`protein_group_protein` AS pgp ON best_int_itc.protein_id = pgp.protein_id
          LEFT JOIN `BVTS`.`protein_group` AS pg ON pgp.protein_group_id = pg.id
          WHERE best_int_itc.public = 1
          GROUP BY compound_id , protein_group_id , temperature) AS `biitc` ON (`biitc`.`pg_label` = `pbv`.primary_group_label
              AND `biitc`.`compound_id` = `cbv`.`compound_id`)
              LEFT JOIN
          (SELECT 
              exper_tsa.id AS id,
              exper_tsa.compound_id AS compound_id,
              POW(10, AVG(LOG10(exper_tsa.kb_obs))) AS kb_obs,
              exper_tsa.temperature AS temperature,
              COUNT(exper_tsa.id) AS count,
              pgp.protein_group_id AS protein_group_id,
              pg.label AS pg_label
          FROM
              `BVTS`.`experiment_tsa_protein_compound_view` AS exper_tsa
          LEFT JOIN `BVTS`.`protein_group_protein` AS pgp ON exper_tsa.protein_id = pgp.protein_id
          LEFT JOIN `BVTS`.`protein_group` AS pg ON pgp.protein_group_id = pg.id
          WHERE exper_tsa.public = 1
          GROUP BY compound_id , protein_group_id , temperature) `etsa` ON (`cbv`.`compound_id` = `etsa`.`compound_id`
              AND `pbv`.`primary_group_label` = `etsa`.`pg_label`)
      WHERE
          `cs`.`public` = 1
      GROUP BY `cs`.`id` , `etsa`.`temperature` , `biitc`.`temperature`
    </Selection>
    <UniqueKey>
      <Field>uuid</Field>
    </UniqueKey>
    <UniqueKey>
      <Field>label</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(label)s</RestfulDB:FKRepresentation>
  </Table>
<!-- Binding experiments -->
  <Table name="experiment_tsa" is_view="true" readonly="true">
    <Title>FTSA experiments</Title>
    <Description>Fluorescent thermal shift assay (FTSA, TSA, DSF, ThermoFluor, TF) experimental data</Description>
    <Explanation>Fluorescent thermal shift assay (FTSA, TSA, DSF, ThermoFluor, TF) experimental data</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Identification number</Definition>
      <Explanation>Identification number of each entered data row.</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="uuid">
      <Title>UUID</Title>
      <Definition>Universally unique identifier</Definition>
      <Explanation>Universally unique identifier of experiment.</Explanation>
      <SQLDataType>varchar(40)</SQLDataType>
      <RestfulDB:Role>uuid</RestfulDB:Role>
    </Field>
    <Field name="label" null="false">
      <Title>Label</Title>
      <Definition>Label</Definition>
      <Explanation>Human-readable label briefly noting table row content.</Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
      <RestfulDB:Role>extkey</RestfulDB:Role>
    </Field>
    <Field name="compound_name">
      <Title>Cmpd name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of compound</Explanation>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula image file</Explanation>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="primary_group_label">
      <Title>Primary group</Title>
      <Definition>Primary group</Definition>
      <Explanation>
        Label of protein group for database selection queries 
      </Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="kb_obs">
      <Title><i>K</i><sub>b,obs</sub></Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Observed binding constant</Definition>
      <Explanation>Observed binding constant, determined experimentally.</Explanation>
      <Units>M<sup>-1</sup></Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="date">
      <Title>Date Exp</Title>
      <Definition>Date of experiment</Definition>
      <Explanation>Date of experiment</Explanation>
      <SQLDataType>date</SQLDataType>
    </Field>
    <Field name="datestamp">
      <Title>Date DB</Title>
      <Definition>Date to DB</Definition>
      <Explanation>Date of entering the experimental data to the database.</Explanation>
      <SQLDataType>date</SQLDataType>
    </Field>
    <Field name="author_id">
      <Title>Performed by</Title>
      <Definition>Experimenter</Definition>
      <Explanation>Name of the person who performed the ITC experiment. </Explanation>
      <SQLDataType>varchar(256)</SQLDataType>
    </Field>
    <Field name="device_id">
      <Title>Device</Title>
      <Definition>Used instrument id</Definition>
      <Explanation>Used instrument id</Explanation>
      <ForeignKey>
        <ReferencedTable>device</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>varchar(256)</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="compound_batch_id">
      <Title>Cmpd batch</Title>
      <Definition>Ligand (Compound) batch id</Definition>
      <Explanation>Ligand (Compound) batch</Explanation>
      <ForeignKey>
        <ReferencedTable>compound_batch</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="compound_max_concentration">
      <Title>Cmpd max conc</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Compound maximal concentration</Definition>
      <Explanation>Compound maximal (start) concentration.</Explanation>
      <Units>μM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="step_count">
      <Title>Cmpd step count</Title>
      <Definition>Compound concentration serial dilution step count</Definition>
      <Explanation>Compound concentration serial dilution step count</Explanation>
      <SQLDataType>smallint</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %2d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="dilution_factor">
      <Title>Dilution factor</Title>
      <Definition>Serial dilution factor for compound concentration</Definition>
      <Explanation>Serial dilution factor for compound concentration</Explanation>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6.3f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="protein_batch_id">
      <Title>Protein batch</Title>
      <Definition>Target protein batch id</Definition>
      <Explanation>Target protein batch</Explanation>
      <ForeignKey>
        <ReferencedTable>protein_batch</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="protein_concentration">
      <Title>Protein conc</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Protein concentration</Definition>
      <Explanation>Protein concentration used in the experiment</Explanation>
      <Units>μM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="buffer_id">
      <Title>Buffer</Title>
      <Definition>Buffer ID</Definition>
      <Explanation>Buffer batch used in the experiment</Explanation>
      <ForeignKey>
        <ReferencedTable>buffer</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>varchar(256)</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="buffer_concentration">
      <Title>Buffer conc</Title>
      <AltName status="old"
               database="protein-ligand-binding-data"
               table="experimental_data">[Buffer], mM</AltName>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Buffer concentration</Definition>
      <Explanation>Buffer concentration.</Explanation>
      <Units>mM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ph">
      <Title>pH</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>pH</Definition>
      <Explanation>The pH of the system if measured or the pH of buffer used.
      </Explanation>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="temperature">
      <Title><i>T</i></Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Temperature</Definition>
      <Explanation>The temperature to which the data were extrapolated</Explanation>
      <Units>°C</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="dmso_concentration">
      <Title>DMSO</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>DMSO concentration</Definition>
      <Explanation>concentration of DMSO, vol/vol %</Explanation>
      <Units>% v/v</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="reliability" null="false">
      <Title>Reliability</Title>
      <Definition>Reliability of the experiment</Definition>
      <Explanation>Arbitrary parameter used to assign the perceived reliability of experimental data. Scale 0-100. Typical properly performed experiment is assigned a value of 90.</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
    </Field>
    <Field name="underlying_data">
      <Title>Underlying data</Title>
      <Definition>Underlying data of the experiment</Definition>
      <Explanation>Underlying data of the experiment. Usually, raw data graphics with fitting curves.</Explanation>
      <SQLDataType>mediumblob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="compound_id">
      <Title>Compound</Title>
      <Definition>Compound</Definition>
      <Explanation>Used compound</Explanation>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>varchar(64)</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="primary_publication_id">
      <Title>Primary publication</Title>
      <Definition>Primary publication</Definition>
      <Explanation>Primary publication of experiment</Explanation>
      <ForeignKey>
        <ReferencedTable>publication</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>User can add any notes about particular experiment if needed.
      </Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`experiment_tsa_protein_compound_view`
      WHERE public = 1
    </Selection>
    <UniqueKey>
      <Field>uuid</Field>
    </UniqueKey>
    <UniqueKey>
      <Field>label</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(label)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="experiment_itc" is_view="true" readonly="true">
    <Title>ITC experiments</Title>
    <Description>Isothermal titration calorimetry (ITC) experimental data</Description>
    <Explanation>Isothermal titration calorimetry (ITC) experimental data</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Identification number</Definition>
      <Explanation>Identification number of each entered data row.</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="uuid">
      <Title>UUID</Title>
      <Definition>Universally unique identifier</Definition>
      <Explanation>Universally unique identifier of experiment.</Explanation>
      <SQLDataType>varchar(40)</SQLDataType>
      <RestfulDB:Role>uuid</RestfulDB:Role>
    </Field>
    <Field name="label" null="false">
      <Title>Label</Title>
      <Definition>Label</Definition>
      <Explanation>Human-readable label briefly noting table row content.</Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
      <RestfulDB:Role>extkey</RestfulDB:Role>
    </Field>
    <Field name="compound_name">
      <Title>Cmpd name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of compound</Explanation>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula image file</Explanation>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="primary_group_label">
      <Title>Primary group</Title>
      <Definition>Primary group</Definition>
      <Explanation>
        Label of protein group for database selection queries 
      </Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="kb_obs">
      <Title><i>K</i><sub>b,obs</sub></Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Observed binding constant</Definition>
      <Explanation>Observed experimental binding constant.</Explanation>
      <Units>M<sup>-1</sup></Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="dbh_obs">
      <Title>Δ<i>H</i><sub>b,obs</sub></Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Observed standard enthalpy change</Definition>
      <Explanation>Observed experimental standard enthalpy change upon binding.</Explanation>
      <Units>kJ/mol</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="date">
      <Title>Date Exp</Title>
      <Definition>Date of experiment</Definition>
      <Explanation>Date of experiment</Explanation>
      <SQLDataType>date</SQLDataType>
    </Field>
    <Field name="datestamp">
      <Title>Date DB</Title>
      <Definition>Date to DB</Definition>
      <Explanation>Date of entering the experimental data to the database.</Explanation>
      <SQLDataType>date</SQLDataType>
    </Field>
    <Field name="author_id">
      <Title>Performed by</Title>
      <Definition>Experimenter</Definition>
      <Explanation>Name of the person who performed the ITC experiment. </Explanation>
      <SQLDataType>varchar(256)</SQLDataType>
    </Field>
    <Field name="device_id">
      <Title>Device</Title>
      <Definition>Used instrument id</Definition>
      <Explanation>Used instrument id</Explanation>
      <ForeignKey>
        <ReferencedTable>device</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>varchar(256)</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="compound_batch_id">
      <Title>Cmpd batch</Title>
      <Definition>Ligand (Compound) batch id</Definition>
      <Explanation>Ligand (Compound) batch</Explanation>
      <ForeignKey>
        <ReferencedTable>compound_batch</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="ligand_concentration">
      <Title>Cmpd conc</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Compound concentration</Definition>
      <Explanation>Compound concentration.</Explanation>
      <Units>μM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="protein_batch_id">
      <Title>Protein batch</Title>
      <Definition>Target protein batch id</Definition>
      <Explanation>Target protein batch</Explanation>
      <ForeignKey>
        <ReferencedTable>protein_batch</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="protein_concentration">
      <Title>Protein conc</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Protein concentration</Definition>
      <Explanation>Protein concentration used in the experiment</Explanation>
      <Units>µM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="buffer_id">
      <Title>Buffer</Title>
      <Definition>Buffer ID</Definition>
      <Explanation>Buffer batch used in the experiment</Explanation>
      <ForeignKey>
        <ReferencedTable>buffer</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>varchar(256)</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="buffer_concentration">
      <Title>Buffer conc</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Buffer concentration</Definition>
      <Explanation>Concentration of buffer.</Explanation>
      <Units>mM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ph">
      <Title>pH</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>pH</Definition>
      <Explanation>The pH of the system if measured or pH of buffer used.
      </Explanation>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="temperature">
      <Title><i>T</i></Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Temperature</Definition>
      <Explanation>The temperature at which the experiment was performed</Explanation>
      <Units>°C</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="n_factor">
      <Title>N factor</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Stoichiometry</Definition>
      <Explanation>
        N factor of experiment.
      </Explanation>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="dmso_concentration">
      <Title>DMSO</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>DMSO concentration</Definition>
      <Explanation>concentration of DMSO, vol/vol %</Explanation>
      <Units>% v/v</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="reliability" null="false">
      <Title>Reliability</Title>
      <Definition>Reliability of the experiment</Definition>
      <Explanation>Arbitrary factor used to assign the reliability of data. Scale 0-100. Typical properly performed experiment is assigned a value of 90.</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
    </Field>
    <Field name="underlying_data">
      <Title>Underlying data</Title>
      <Definition>Underlying data of the experiment</Definition>
      <Explanation>Underlying data of the experiment. Usually, raw data graphics with fitting curves.</Explanation>
      <SQLDataType>mediumblob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="compound_id">
      <Title>Compound</Title>
      <Definition>Compound</Definition>
      <Explanation>Used compound</Explanation>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>varchar(64)</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="primary_publication_id">
      <Title>Primary publication</Title>
      <Definition>Primary publication</Definition>
      <Explanation>Primary publication of experiment</Explanation>
      <ForeignKey>
        <ReferencedTable>publication</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>User can add any notes about particular experiment if needed
      </Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision')
        where this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`experiment_itc_protein_compound_view`
      WHERE public = 1
    </Selection>
    <UniqueKey>
      <Field>uuid</Field>
    </UniqueKey>
    <UniqueKey>
      <Field>label</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(label)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="experiment_spr" is_view="true" readonly="true">
    <Title>SPR experiments</Title>
    <Description>Experimental data of surface plasmon resonance</Description>
    <Explanation>Experimental data of surface plasmon resonance</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Identification number</Definition>
      <Explanation>Identification number of each entered data row.</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="uuid">
      <Title>UUID</Title>
      <Definition>Universally unique identifier</Definition>
      <Explanation>Universally unique identifier of experiment.</Explanation>
      <SQLDataType>varchar(40)</SQLDataType>
      <RestfulDB:Role>uuid</RestfulDB:Role>
    </Field>
    <Field name="label" null="false">
      <Title>Label</Title>
      <Definition>Label</Definition>
      <Explanation>Human-readable label briefly noting table row content.</Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
      <RestfulDB:Role>extkey</RestfulDB:Role>
    </Field>
    <Field name="compound_name">
      <Title>Cmpd name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of compound</Explanation>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula image file</Explanation>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="primary_group_label">
      <Title>Primary group</Title>
      <Definition>Primary group</Definition>
      <Explanation>
        Label of protein group for database selection queries 
      </Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="k_a_obs">
      <Title>k<sub>a,obs</sub></Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Observed association rate constant</Definition>
      <Explanation>Observed association rate constant</Explanation>
      <Units>M<sup>-1</sup>s<sup>-1</sup></Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
      </Field>  
    <Field name="k_d_obs">
      <Title>k<sub>d,obs</sub></Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Observed dissociation rate constant</Definition>
      <Explanation>Observed dissociation rate constant</Explanation>
      <Units>s<sup>-1</sup></Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
      </Field>    
    <Field name="k_ed_obs">
      <Title><i>K</i><sub>D,obs</sub></Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Observed equilibrium dissociation constant</Definition>
      <Explanation>Observed equilibrium dissociation constant</Explanation>
      <Units>M</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
      </Field>  
    <Field name="k_a_int">
      <Title>k<sub>a,int</sub> , pub</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Published intrinsic association rate constant</Definition>
      <Explanation>Published intrinsic association rate constant</Explanation>
      <Units>M<sup>-1</sup>s<sup>-1</sup></Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
      </Field>  
    <Field name="k_d_int">
      <Title>k<sub>d,int</sub> , pub</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Published intrinsic dissociation rate constant</Definition>
      <Explanation>Published intrinsic dissociation rate constant</Explanation>
      <Units>s<sup>-1</sup></Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
      </Field>    
    <Field name="k_ed_int">
      <Title><i>K</i><sub>D,int</sub> , pub</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Published intrinsic equilibrium dissociation constant</Definition>
      <Explanation>Published intrinsic equilibrium dissociation constant</Explanation>
      <Units>M</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>  
    <Field name="date">
      <Title>Date Exp</Title>
      <Definition>Date of experiment</Definition>
      <Explanation>Date of experiment</Explanation>
      <SQLDataType>date</SQLDataType>
    </Field>
    <Field name="datestamp">
      <Title>Date DB</Title>
      <Definition>Date to DB</Definition>
      <Explanation>Date of entering the experimental data to the database.</Explanation>
      <SQLDataType>date</SQLDataType>
    </Field>
    <Field name="author_id">
      <Title>Performed by</Title>
      <Definition>Experimenter</Definition>
      <Explanation>Name of the person who performed the experiment. </Explanation>
      <SQLDataType>varchar(256)</SQLDataType>
    </Field>
    <Field name="device_id">
      <Title>Device</Title>
      <Definition>Used instrument id</Definition>
      <Explanation>Used instrument id</Explanation>
      <ForeignKey>
        <ReferencedTable>device</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>varchar(256)</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="compound_batch_id">
      <Title>Cmpd batch</Title>
      <Definition>Ligand (Compound) batch id</Definition>
      <Explanation>Ligand (Compound) batch</Explanation>
      <ForeignKey>
        <ReferencedTable>compound_batch</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="compound_max_concentration">
      <Title>Cmpd max conc</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Compound maximal concentration</Definition>
      <Explanation>Compound maximal (start) concentration.</Explanation>
      <Units>μM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="step_count">
      <Title>Cmpd step count</Title>
      <Definition>Compound concentration serial dilution step count</Definition>
      <Explanation>Compound concentration serial dilution step count</Explanation>
      <SQLDataType>smallint</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %2d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="compound_min_concentration">
      <Title>Cmpd min conc</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Compound minimal concentration</Definition>
      <Explanation>Compound minimal (final) concentration.</Explanation>
      <Units>μM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6.3f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="protein_batch_id">
      <Title>Protein batch</Title>
      <Definition>Target protein batch id</Definition>
      <Explanation>Target protein batch</Explanation>
      <ForeignKey>
        <ReferencedTable>protein_batch</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="buffer_id">
      <Title>Buffer</Title>
      <Definition>Buffer ID</Definition>
      <Explanation>Buffer batch used in the experiment</Explanation>
      <ForeignKey>
        <ReferencedTable>buffer</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>varchar(256)</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="buffer_concentration">
      <Title>Buffer conc</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Buffer concentration</Definition>
      <Explanation>Concentration of buffer.</Explanation>
      <Units>mM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ph">
      <Title>pH</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>pH</Definition>
      <Explanation>The pH of the system if measured or the pH buffer used in the experiment.
      </Explanation>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="temperature">
      <Title><i>T</i></Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Temperature</Definition>
      <Explanation>The temperature of the experiment</Explanation>
      <Units>°C</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="dmso_concentration">
      <Title>DMSO</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>DMSO concentration</Definition>
      <Explanation>concentration of DMSO, vol/vol %</Explanation>
      <Units>% v/v</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="reliability" null="false">
      <Title>Reliability</Title>
      <Definition>Reliability of the experiment</Definition>
      <Explanation>Arbitrary parameter used to assign the reliability of data. Scale 0-100. Typical experiment is assigned a value of 90.</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
    </Field>
    <Field name="underlying_data">
      <Title>Underlying data</Title>
      <Definition>Underlying data of the experiment</Definition>
      <Explanation>Underlying data of the experiment. Usually, raw data graphics with fitting curves.</Explanation>
      <SQLDataType>mediumblob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="compound_id">
      <Title>Compound</Title>
      <Definition>Compound</Definition>
      <Explanation>Used compound</Explanation>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>varchar(64)</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="primary_publication_id">
      <Title>Primary publication</Title>
      <Definition>Primary publication</Definition>
      <Explanation>Primary publication of experiment</Explanation>
      <ForeignKey>
        <ReferencedTable>publication</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>User can add any notes about particular experiment if needed
      </Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision')
        where this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`experiment_spr_protein_compound_view`
      WHERE public = 1
    </Selection>
    <UniqueKey>
      <Field>uuid</Field>
    </UniqueKey>
    <UniqueKey>
      <Field>label</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(label)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="experiment_sfa" is_view="true" readonly="true">
    <Title>SFA experiments</Title>
    <Description>Experimental data of stopped-flow assay (SFA) of enzyme inhibition</Description>
    <Explanation>Experimental data of stopped-flow assay (SFA) of enzyme inhibition</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Identification number</Definition>
      <Explanation>Identification number of each entered data row.</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="uuid">
      <Title>UUID</Title>
      <Definition>Universally unique identifier</Definition>
      <Explanation>Universally unique identifier of experiment.</Explanation>
      <SQLDataType>varchar(40)</SQLDataType>
      <RestfulDB:Role>uuid</RestfulDB:Role>
    </Field>
    <Field name="label" null="false">
      <Title>Label</Title>
      <Definition>Label</Definition>
      <Explanation>Human-readable label briefly noting table row content.</Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
      <RestfulDB:Role>extkey</RestfulDB:Role>
    </Field>
    <Field name="compound_name">
      <Title>Cmpd name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of compound</Explanation>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula image file</Explanation>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="primary_group_label">
      <Title>Primary group</Title>
      <Definition>Primary group</Definition>
      <Explanation>
        Label of protein group for database selection queries 
      </Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="ic50">
      <Title>IC50</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>IC50</Definition>
      <Explanation></Explanation>
      <Units>nM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>    
    <Field name="km">
      <Title><i>K</i><sub>M</sub></Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Michaelis constant</Definition>
      <Explanation>Michaelis constant</Explanation>
      <Units>mM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ki">
      <Title><i>K</i><sub>i</sub></Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Inhibition constant</Definition>
      <Explanation>Inhibition constant</Explanation>
      <Units>nM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="date">
      <Title>Date Exp</Title>
      <Definition>Date of experiment</Definition>
      <Explanation>Date of experiment</Explanation>
      <SQLDataType>date</SQLDataType>
    </Field>
    <Field name="datestamp">
      <Title>Date DB</Title>
      <Definition>Date to DB</Definition>
      <Explanation>Date of entering the experimental data to the database.</Explanation>
      <SQLDataType>date</SQLDataType>
    </Field>
    <Field name="author_id">
      <Title>Performed by</Title>
      <Definition>Experimenter</Definition>
      <Explanation>Name of the person who performed the experiment. </Explanation>
      <SQLDataType>varchar(256)</SQLDataType>
    </Field>
    <Field name="device_id">
      <Title>Device</Title>
      <Definition>Used instrument id</Definition>
      <Explanation>Used instrument id</Explanation>
      <ForeignKey>
        <ReferencedTable>device</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>varchar(256)</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="compound_batch_id">
      <Title>Cmpd batch</Title>
      <Definition>Ligand (Compound) batch id</Definition>
      <Explanation>Ligand (Compound) batch</Explanation>
      <ForeignKey>
        <ReferencedTable>compound_batch</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="compound_max_concentration">
      <Title>Cmpd max conc</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Compound maximal concentration</Definition>
      <Explanation>Compound maximal (start) concentration.</Explanation>
      <Units>μM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="step_count">
      <Title>Cmpd step count</Title>
      <Definition>Compound concentration serial dilution step count</Definition>
      <Explanation>Compound concentration serial dilution step count</Explanation>
      <SQLDataType>smallint</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %2d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="dilution_factor">
      <Title>Dilution factor</Title>
      <Definition>Dilution factor for compound concentration</Definition>
      <Explanation>Dilution factor for compound concentration</Explanation>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6.3f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="protein_batch_id">
      <Title>Protein batch</Title>
      <Definition>Target protein batch id</Definition>
      <Explanation>Target protein batch</Explanation>
      <ForeignKey>
        <ReferencedTable>protein_batch</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="protein_concentration">
      <Title>Protein conc</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Protein concentration</Definition>
      <Explanation>Protein concentration used in the experiment</Explanation>
      <Units>nM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="buffer_id">
      <Title>Buffer</Title>
      <Definition>Buffer ID</Definition>
      <Explanation>Buffer batch used in the experiment</Explanation>
      <ForeignKey>
        <ReferencedTable>buffer</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>varchar(256)</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="buffer_concentration">
      <Title>Buffer conc</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Buffer concentration</Definition>
      <Explanation>Concentration of buffer.</Explanation>
      <Units>mM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ph">
      <Title>pH</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>pH</Definition>
      <Explanation>The pH of the system if measured or the pH of buffer used in the experiment.
      </Explanation>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="temperature">
      <Title><i>T</i></Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Temperature</Definition>
      <Explanation>The temperature of the experiment</Explanation>
      <Units>°C</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="dmso_concentration">
      <Title>DMSO</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>DMSO concentration</Definition>
      <Explanation>concentration of DMSO, vol/vol %</Explanation>
      <Units>% v/v</Units>
      <SQLDataType>float</SQLDataType>
    </Field>
    <Field name="co2_concentration">
      <Title>[CO<sub>2</sub>]</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>CO<sub>2</sub> concentration</Definition>
      <Explanation>concentration of CO<sub>2</sub></Explanation>
      <Units>mM</Units>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="reliability" null="false">
      <Title>Reliability</Title>
      <Definition>Reliability of the experiment</Definition>
      <Explanation>Arbitrary parameter used to assign the reliability of data. Scale 0-100. Typical experiment is assigned a value of 90.</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
    </Field>
    <Field name="underlying_data">
      <Title>Underlying data</Title>
      <Definition>Underlying data of the experiment</Definition>
      <Explanation>Underlying data of the experiment. Usually, raw data graphics with fitting curves.</Explanation>
      <SQLDataType>mediumblob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="compound_id">
      <Title>Compound</Title>
      <Definition>Compound</Definition>
      <Explanation>Used compound</Explanation>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>varchar(64)</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="primary_publication_id">
      <Title>Primary publication</Title>
      <Definition>Primary publication</Definition>
      <Explanation>Primary publication of experiment</Explanation>
      <ForeignKey>
        <ReferencedTable>publication</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <Explanation>User can add any notes about particular experiment if needed
      </Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision')
        where this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`experiment_sfa_protein_compound_view`
      WHERE public = 1
    </Selection>
    <UniqueKey>
      <Field>uuid</Field>
    </UniqueKey>
    <UniqueKey>
      <Field>label</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(label)s</RestfulDB:FKRepresentation>
  </Table>
<!-- Protonation experiments-->
  <Table name="best_buffer_protonation" is_view="true" readonly="true">
    <Title>Best buffer protonation</Title>
    <Description>Thermodynamic parameters of buffer protonation</Description>
    <Explanation>
      Arithmetic averages of buffer pK<sub>a</sub> and Δ<i>H</i><sub>a</sub> 
      values from buffer protonation table that has largest 'reliability' 
      column values. This DB VIEW selects the best descriptions of buffer 
      protonation pK<sub>a</sub> and Δ<i>H</i><sub>a</sub> for each temperature, 
      based on the `reliability` column assesments. Only values with 
      maximum reliability are used; if there is more than one such value, 
      all such best values are grouped and averaged (and the number of 
      entries averaged and the standard deviation are reported). 
      Temperature is rounded to the integer number of Celsius degrees 
      when grouping; e.g. temperatures 37, 36.6 and 37.1 are all regarded 
      as describing buffer behavior at 37°C. 
    </Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>The numeric (integer) primary key of the table.</Definition>
      <Explanation>
        The value of the `id` column is generated automatically by
        selecting the minimum value of the `id` in the underlying
        table, `buffer_protonation` (another choice could have been
        max() value of the `buffer_protonation.id`). Since the
        original `id` values are unique, and the GROUP statement
        collects rows into equivalence classes (i.e. each row is in
        one and only one GROUP), the values of the
        `best_buffer_protonation_view.id` column are also guaranteed to be
        unique.
      </Explanation>
      <Code language="SQL" dialect="MySQL">
        bbp.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="temperature">
      <Title><i>T</i></Title>
      <Definition>Temperature</Definition>
      <Explanation>Temperature of the experiment</Explanation>
      <Units>°C</Units>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="pka">
      <Title>pK<sub>a</sub></Title>
      <Definition>pK<sub>a</sub>, average value</Definition>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="dah">
      <Title>Δ<i>H</i><sub>a</sub></Title>
      <Definition>Δ<i>H</i><sub>a</sub>, average value</Definition>
      <Units>kJ/mol</Units>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="buffer_id">
      <Title>Buffer</Title>
      <Definition>Used buffer</Definition>
      <Explanation>The buffer used for protonation experiments</Explanation>
      <ForeignKey>
        <ReferencedTable>buffer</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="reliability" null="false">
      <Title>Q<sub>exp</sub></Title>
      <Definition>Reliability of the experiment</Definition>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes from reviewed items</Definition>
      <Code language="SQL" dialect="MySQL">
        bbp.notes
      </Code>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        The latest revision ID from source tables or/and views
      </Definition>
      <Explanation>
        Last database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        bbp.revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL" dialect="MySQL">
      FROM `BVTS`.best_buffer_protonation AS bbp 
        JOIN `BVTS`.`buffer` AS b 
          ON bbp.buffer_id = b.id
    </Selection>
    <UniqueKey>
      <Field>buffer_id</Field>
      <Field>temperature</Field>
      <Field>reliability</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>ΔHₐ=%(dah)g</RestfulDB:FKRepresentation>
  </Table>
  <Table name="best_compound_protonation_dah" is_view="true" readonly="true">
    <Title>Best compound protonation Δ<i>H</i><sub>a</sub></Title>
    <Description>Arithmetic averages of compound Δ<i>H</i><sub>a</sub> values that fulfill the defined threshold of reliability.</Description>
    <Explanation>
      Arithmetic averages of compound Δ<i>H</i><sub>a</sub> values from compound 
      protonation table that has largest 'reliability' column values. 
      This DB VIEW selects the best descriptions of compound protonation 
      Δ<i>H</i><sub>a</sub> for each temperature, based on the `reliability`
      column assesments. Only values with maxumum reliability are
      used; if there is more than one such value, all such best values
      are grouped and averaged (and the number of entries averaged and
      the standard deviation are reported). Temperature is rounded to
      the integer number of Celsius degrees when grouping;
      e.g. temperatures 37, 36.6 and 37.1 are all regarded as
      describing buffer behaviour at 37°C.
    </Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>The numeric (integer) primary key of the table.</Definition>
      <Explanation>
        The value of the `id` column is generated automatically be
        selecting the minimum value of the `id` in the underlying
        table, `compound_protonation_dah` (another choise could have been
        max() value of the `compound_protonation_dah.id`). Since the
        original `id` values are unique, and the GROUP statement
        collects rows into equivalence classes (i.e. each row is in
        one and only one GROUP), the values of the
        `best_compound_protonation_dah_view.id` column are also guaranteed to be
        unique.
      </Explanation>
      <Code language="SQL" dialect="MySQL">
        bcpd.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="ids">
      <Title>IDs</Title>
      <Definition>ID's of experiments used for calculations</Definition>
      <SQLDataType>varchar(512)</SQLDataType>      
    </Field>
    <Field name="compound_label">
      <Title>Cmpd label</Title>
      <Definition>Compound label</Definition>
    </Field>
    <Field name="name">
      <Title>Name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of synthesized or used compound as 
      represented in publications. </Explanation>
      <Code language="SQL" dialect="MySQL">
        c.name
      </Code>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula image file</Explanation>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="temperature">
      <Title><i>T</i></Title>
      <Definition>Temperature</Definition>
      <Explanation>Temperature of the experiment</Explanation>
      <Units>°C</Units>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="dah">
      <Title>Δ<i>H</i><sub>a</sub></Title>
      <Definition>Δ<i>H</i><sub>a</sub>, average value</Definition>
      <Units>kJ/mol</Units>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="sigdah">
      <Title>σ<sub>Δ<i>H</i><sub>a</sub></sub></Title>
      <Definition>Standard deviation of Δ<i>H</i><sub>a</sub> value</Definition>
      <Units>kJ/mol</Units>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="n">
      <Title>N</Title>
      <Definition>The number of experiments</Definition>
    </Field>
    <Field name="author_ids">
      <Title>Performed by IDs</Title>
      <Definition>The person(s) who performed the experiment</Definition>
      <Code language="SQL" dialect="MySQL">
        bcpd.author_ids
      </Code>
      <SQLDataType>varchar(256)</SQLDataType>      
    </Field>
    <Field name="dah_sources">
      <Title>Δ<i>H</i><sub>a</sub> sources</Title>
      <Definition>Δ<i>H</i><sub>a</sub> sources</Definition>
    </Field>
    <Field name="reliability" null="false">
      <Title>Q<sub>exp</sub></Title>
      <Definition>Reliability of experiment</Definition>
    </Field>
    <Field name="compound_id">
      <Title>Compound</Title>
      <Definition>Compound</Definition>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        bcpd.compound_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes from reviewed items</Definition>
      <Code language="SQL" dialect="MySQL">
        bcpd.notes
      </Code>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        bcpd.revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL" dialect="MySQL">
      FROM `BVTS`.`best_compound_protonation_dah` AS bcpd 
        JOIN `BVTS`.`compound` AS c ON c.id = bcpd.compound_id
      WHERE bcpd.public = 1
      GROUP BY bcpd.compound_id , temperature , reliability
    </Selection>
    <UniqueKey>
      <Field>compound_id</Field>
      <Field>temperature</Field>
      <Field>reliability</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(dah)3.1f (%(compound_name)s)</RestfulDB:FKRepresentation>
  </Table>
  <Table name="best_compound_protonation_pka" is_view="true" readonly="true">
    <Title>Best compound protonation pK<sub>a</sub></Title>
    <Description>Arithmetic averages of compound pK<sub>a</sub> values that fulfill the defined threshold of reliability.
</Description>
    <Explanation>
      Arithmetic averages of compound pK<sub>a</sub> values from compound 
      protonation table that has largest 'reliability' column values. 
      This DB VIEW selects the best descriptions of compound protonation 
      pK<sub>a</sub> for each temperature, based on the `reliability`
      column assesments. Only values with maxumum reliability are
      used; if there is more than one such value, all such best values
      are grouped and averaged (and the number of entries averaged and
      the standard deviation are reported). Temperature is rounded to
      the integer number of Celsius degrees when grouping;
      e.g. temperatures 37, 36.6 and 37.1 are all regarded as
      describing buffer behaviour at 37°C.
    </Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>The numeric (integer) primary key of the table.</Definition>
      <Explanation>
        The value of the `id` column is generated automatically be
        selecting the minimum value of the `id` in the underlying
        table, `compound_protonation_pka` (another choise could have been
        max() value of the `compound_protonation_pka.id`). Since the
        original `id` values are unique, and the GROUP statement
        collects rows into equivalence classes (i.e. each row is in
        one and only one GROUP), the values of the
        `best_compound_protonation_pka_view.id` column are also guaranteed to be
        unique.
      </Explanation>
      <Code language="SQL" dialect="MySQL">
        bcpp.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="ids">
      <Title>IDs</Title>
      <Definition>ID's of experiments used for calculations</Definition>
      <SQLDataType>varchar(512)</SQLDataType>
    </Field>
    <Field name="compound_label">
      <Title>Cmpd label</Title>
      <Definition>Compound label</Definition>
    </Field>
    <Field name="name">
      <Title>Name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of synthesized or used compound as 
      represented in publications. </Explanation>
      <Code language="SQL" dialect="MySQL">
        c.name
      </Code>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula image file</Explanation>
       <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="temperature">
      <Title><i>T</i></Title>
      <Definition>Temperature</Definition>
      <Explanation>Temperature of the experiment</Explanation>
      <Units>°C</Units>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="pka">
      <Title>pK<sub>a</sub></Title>
      <Definition>pK<sub>a</sub>, average value</Definition>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="sigpka">
      <Title>σ<sub>pK<sub>a</sub></sub></Title>
      <Definition>Standard deviation of pK<sub>a</sub>  value</Definition>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="n">
      <Title>N</Title>
      <Definition>The number of experiments</Definition>
    </Field>
    <Field name="author_ids">
      <Title>Performed by IDs</Title>
      <Definition>The person(s) who performed the experiment</Definition>
      <Code language="SQL" dialect="MySQL">
        bcpp.author_ids
      </Code>
      <SQLDataType>varchar(256)</SQLDataType>      
    </Field>
    <Field name="pka_sources">
      <Title>pK<sub>a</sub> sources</Title>
      <Definition>Value source</Definition>
    </Field>
    <Field name="reliability" null="false">
      <Title>Q<sub>exp</sub></Title>
      <Definition>Reliability of experiment</Definition>
    </Field>
    <Field name="compound_id">
      <Title>Compound</Title>
      <Definition>Compound</Definition>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        bcpp.compound_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes from reviewed items</Definition>
      <Code language="SQL" dialect="MySQL">
        bcpp.notes
      </Code>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        The latest revision ID from source tables or/and views
      </Definition>
      <Explanation>
        Last database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        bcpp.revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL" dialect="MySQL">
      FROM `BVTS`.`best_compound_protonation_pka` AS bcpp 
        JOIN `BVTS`.`compound` AS c ON c.id = bcpp.compound_id
      WHERE bcpp.public = 1
      GROUP BY bcpp.compound_id , temperature , reliability
    </Selection>
    <UniqueKey>
      <Field>compound_id</Field>
      <Field>temperature</Field>
      <Field>reliability</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(pka)3.1f (%(compound_name)s)</RestfulDB:FKRepresentation>
    </Table>
  <Table name="best_protein_protonation_dah" is_view="true" readonly="true">
    <Title>Best protein protonation Δ<i>H</i><sub>a</sub></Title>
    <Description>Arithmetic averages of protein Δ<i>H</i><sub>a</sub> values that fulfill the defined threshold of reliability.</Description>
    <Explanation>
      Arithmetic averages of protein Δ<i>H</i><sub>a</sub> values from protein 
      protonation table that has largest 'reliability' column values. 
      This DB VIEW selects the best descriptions of protein protonation 
      Δ<i>H</i><sub>a</sub> for each temperature, based on the `reliability`
      column assesments. Only values with maxumum reliability are
      used; if there is more than one such value, all such best values
      are grouped and averaged (and the number of entries averaged and
      the standard deviation are reported). Temperature is rounded to
      the integer number of Celsius degrees when grouping;
      e.g. temperatures 37, 36.6 and 37.1 are all regarded as
      describing buffer behaviour at 37°C.
    </Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>The numeric (integer) primary key of the table.</Definition>
      <Explanation>
        The value of the `id` column is generated automatically be
        selecting the minimum value of the `id` in the underlying
        table, `protein_protonation_dah` (another choise could have been
        max() value of the `protein_protonation_dah.id`). Since the
        original `id` values are unique, and the GROUP statement
        collects rows into equivalence classes (i.e. each row is in
        one and only one GROUP), the values of the
        `best_protein_protonation_dah_view.id` column are also guaranteed to be
        unique.
      </Explanation>
      <Code language="SQL" dialect="MySQL">
        bppd.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="ids">
      <Title>IDs</Title>
      <Definition>ID's of experiments used for calculations</Definition>
      <SQLDataType>varchar(512)</SQLDataType>
    </Field>
    <Field name="protein_label">
      <Title>Protein label</Title>
      <Definition>Protein label</Definition>
      <Code language="SQL" dialect="MySQL">
        bppd.protein_label
      </Code>
    </Field>
    <Field name="protein_name">
      <Title>Name</Title>
      <Definition>Name of protein</Definition>
      <Explanation>
        Name of protein  as represented in key 
        publications. For isoforms Roman numerals used.
      </Explanation>
      <Code language="SQL" dialect="MySQL">
        pbv.name
      </Code>
      <SQLDataType>varchar(32)</SQLDataType>
    </Field>
    <Field name="primary_group_label">
      <Title>Primary group</Title>
      <Definition>Primary group</Definition>
      <Explanation>
        Label of protein group for database selection queries 
      </Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="temperature">
      <Title><i>T</i></Title>
      <Definition>Temperature</Definition>
      <Explanation>Temperature of the experiment</Explanation>
      <Units>°C</Units>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="dah_zn">
      <Title>Δ<i>H</i><sub>a,Zn</sub></Title>
      <Definition>Δ<i>H</i><sub>a,Zn</sub> value</Definition>
      <Units>kJ/mol</Units>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="sigdah_zn">
      <Title>σ<sub>Δ<i>H</i><sub>a,Zn</sub></sub></Title>
      <Definition>Standard deviation of Δ<i>H</i><sub>a,Zn</sub> value</Definition>
      <Units>kJ/mol</Units>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="n">
      <Title>N</Title>
      <Definition>The number of experiments</Definition>
    </Field>
    <Field name="author_ids">
      <Title>Performed by IDs</Title>
      <Definition>The person(s) who performed the experiment</Definition>
      <Code language="SQL" dialect="MySQL">
        bppd.author_ids
      </Code>
      <SQLDataType>varchar(256)</SQLDataType>      
    </Field>
    <Field name="dah_source">
      <Title>Δ<i>H</i><sub>a</sub> sources</Title>
      <Definition>Value source</Definition>
    </Field>
    <Field name="reliability" null="false">
      <Title>Q<sub>exp</sub></Title>
      <Definition>Reliability of experiment</Definition>
    </Field>
    <Field name="protein_id">
      <Title>Protein</Title>
      <Definition>Protein</Definition>
      <ForeignKey>
        <ReferencedTable>protein</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        bppd.protein_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes from reviewed items</Definition>
      <Code language="SQL" dialect="MySQL">
        bppd.notes
      </Code>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        bppd.revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL" dialect="MySQL">
      FROM `BVTS`.`best_protein_protonation_dah` AS bppd 
        JOIN `BVTS`.`protein_batch_view` AS pbv ON pbv.protein_id = bppd.protein_id
      WHERE bppd.public = 1
      GROUP BY bppd.protein_id , temperature , reliability
    </Selection>
    <UniqueKey>
      <Field>protein_id</Field>
      <Field>temperature</Field>
      <Field>reliability</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(dah_zn)3.1f (%(protein_name)s)</RestfulDB:FKRepresentation>
  </Table>
  <Table name="best_protein_protonation_pka" is_view="true" readonly="true">
    <Title>Best protein protonation pK<sub>a</sub></Title>
    <Description>Arithmetic averages of protein pK<sub>a</sub> values that fulfill the defined threshold of reliability.
</Description>
    <Explanation>
      Arithmetic averages of protein pK<sub>a</sub> values from protein 
      protonation table that has largest 'reliability' column values. 
      This DB VIEW selects the best descriptions of protein protonation 
      pK<sub>a</sub> for each temperature, based on the `reliability`
      column assesments. Only values with maxumum reliability are
      used; if there is more than one such value, all such best values
      are grouped and averaged (and the number of entries averaged and
      the standard deviation are reported). Temperature is rounded to
      the integer number of Celsius degrees when grouping;
      e.g. temperatures 37, 36.6 and 37.1 are all regarded as
      describing buffer behaviour at 37°C.
    </Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>The numeric (integer) primary key of the table.</Definition>
      <Explanation>
        The value of the `id` column is generated automatically be
        selecting the minimum value of the `id` in the underlying
        table, `protein_protonation_pka` (another choise could have been
        max() value of the `protein_protonation_pka.id`). Since the
        original `id` values are unique, and the GROUP statement
        collects rows into equivalence classes (i.e. each row is in
        one and only one GROUP), the values of the
        `best_protein_protonation_pka_view.id` column are also guaranteed to be
        unique.
      </Explanation>
      <Code language="SQL" dialect="MySQL">
        bppp.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="ids">
      <Title>IDs</Title>
      <Definition>ID's of experiments used for calculations</Definition>
      <SQLDataType>varchar(512)</SQLDataType>
    </Field>
    <Field name="protein_label">
      <Title>Protein label</Title>
      <Definition>Protein label</Definition>
      <Code language="SQL" dialect="MySQL">
        bppp.protein_label
      </Code>
    </Field>
    <Field name="protein_name">
      <Title>Name</Title>
      <Definition>Name of protein</Definition>
      <Explanation>
        Name of protein  as represented in key 
        publications. For isoforms Roman numerals used.
      </Explanation>
      <Code language="SQL" dialect="MySQL">
        pbv.name
      </Code>
      <SQLDataType>varchar(32)</SQLDataType>
    </Field>
    <Field name="primary_group_label">
      <Title>Primary group</Title>
      <Definition>Primary group</Definition>
      <Explanation>
        Label of protein group for database selection queries 
      </Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="temperature">
      <Title><i>T</i></Title>
      <Definition>Temperature</Definition>
      <Explanation>Temperature of the experiment</Explanation>
      <Units>°C</Units>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="pka_zn">
      <Title>pK<sub>a,Zn</sub></Title>
      <Definition>pK<sub>a</sub> value</Definition>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="sigpka_zn">
      <Title>σ<sub>pK<sub>a,Zn</sub></sub></Title>
      <Definition>Assumed uncertainty</Definition>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="n">
      <Title>N</Title>
      <Definition>The number of experiments</Definition>
    </Field>
    <Field name="author_ids">
      <Title>Performed by IDs</Title>
      <Definition>The person(s) who performed the experiment</Definition>
      <Code language="SQL" dialect="MySQL">
        bppp.author_ids
      </Code>
      <SQLDataType>varchar(256)</SQLDataType>      
    </Field>
    <Field name="pka_source">
      <Title>pK<sub>a</sub> source</Title>
      <Definition>pK<sub>a</sub> source</Definition>
    </Field>
    <Field name="reliability" null="false">
      <Title>Q<sub>exp</sub></Title>
      <Definition>Reliability of experiment</Definition>
    </Field>
    <Field name="protein_id">
      <Title>Protein</Title>
      <Definition>Protein</Definition>
      <ForeignKey>
        <ReferencedTable>protein</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        bppp.protein_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes from reviewed items</Definition>
      <Code language="SQL" dialect="MySQL">
        bppp.notes
      </Code>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        bppp.revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL" dialect="MySQL">
      FROM `BVTS`.`best_protein_protonation_pka` AS bppp 
        JOIN `BVTS`.`protein_batch_view` AS pbv ON pbv.protein_id = bppp.protein_id
      WHERE bppp.public = 1
      GROUP BY bppp.protein_id , temperature , reliability
    </Selection>
    <UniqueKey>
      <Field>protein_id</Field>
      <Field>temperature</Field>
      <Field>reliability</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(pka_zn)3.1f (%(protein_name)s)</RestfulDB:FKRepresentation>
  </Table>
<!-- Intrinsic parameters -->
  <Table name="intrinsic_parameters" is_view="true" readonly="true">
    <Title>Intrinsic parameters</Title>
    <Description>The thermodynamic parameters of protein-ligand interaction, corrected to account for linked protonation reactions.</Description>
    <Explanation>Intrinsic thermodynamic parameters of 
protein-ligand binding. As described in article 
<a href="https://doi.org/10.1017/s0033583518000082" target="_blank">https://doi.org/10.1017/s0033583518000082</a>
    </Explanation>
    <Field name="id" null="false" primary_key="1">
      <Title>IDs</Title>
      <Definition>
        Experiment IDs range. 
        The numeric (integer) primary key of the table.
      </Definition>
      <Code language="SQL" dialect="MySQL">
        ip.id
      </Code>
      <SQLDataType>varchar(63)</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="compound_id">
      <Title>Compound</Title>
      <Definition>Compound</Definition>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field> 
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula image file</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.formula_file
      </Code>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="protein_id">
      <Title>Protein</Title>
      <Definition>Protein</Definition>
      <ForeignKey>
        <ReferencedTable>protein</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        ip.protein_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>    
    <Field name="primary_group_label">
      <Title>Primary group</Title>
      <Definition>Primary group</Definition>
      <Explanation>
        Label of protein group for database selection queries 
      </Explanation>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="kb_int">
      <Title><i>K</i><sub>b,int</sub></Title>
      <Definition>Intrinsic <i>K</i><sub>b</sub></Definition>
      <Units>M<sup>-1</sup></Units>
      <Formula>
        <Primary>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
            <mrow>
              <msub>
                <mrow>
                  <mi>K</mi>
                </mrow>
                <mrow>
                  <mi>b</mi>
                  <mo>,</mo>
                  <mi>i</mi>
                  <mi>n</mi>
                  <mi>t</mi>
                </mrow>
              </msub>
              <mo>=</mo>
              <msub>
                <mrow>
                  <mi>K</mi>
                </mrow>
                <mrow>
                  <mi>b</mi>
                  <mo>,</mo>
                  <mi>o</mi>
                  <mi>b</mi>
                  <mi>s</mi>
                </mrow>
              </msub>
              <mo stretchy="false">(</mo>
              <mn>1</mn>
              <mo>+</mo>
              <msup>
                <mrow>
                  <mn>10</mn>
                </mrow>
                <mrow>
                  <mi>p</mi>
                  <msub>
                    <mrow>
                      <mi>K</mi>
                    </mrow>
                    <mrow>
                      <mi>a</mi>
                      <mo>,</mo>
                      <mi>S</mi>
                      <mi>A</mi>
                    </mrow>
                  </msub>
                  <mo>-</mo>
                  <mi>p</mi>
                  <mi>H</mi>
                </mrow>
              </msup>
              <mo stretchy="false">)</mo>
              <mo stretchy="false">(</mo>
              <mn>1</mn>
              <mo>+</mo>
              <msup>
                <mrow>
                  <mn>10</mn>
                </mrow>
                <mrow>
                  <mi>p</mi>
                  <mi>H</mi>
                  <mo>-</mo>
                  <mi>p</mi>
                  <msub>
                    <mrow>
                      <mi>K</mi>
                    </mrow>
                    <mrow>
                      <mi>a</mi>
                      <mo>,</mo>
                      <mi>C</mi>
                      <mi>A</mi>
                    </mrow>
                  </msub>
                </mrow>
              </msup>
              <mo stretchy="false">)</mo>
            </mrow>
          </math>
          <Variables>
            <Variable>
              <Name>K_{b,int}</Name>: intrinsic binding constant value
            </Variable>
            <Variable>
              <Name>K_{b,obs}</Name>: observed binding constant
              <FieldRef table="experiment_tsa" field="kb_obs"/>
            </Variable>
            <Variable>
              <Name>pH</Name>: pH value taken from the <FieldRef
              table="experiment_tsa" field="ph"/> column
            </Variable>
            <Variable>
              <Name>pK_{a,SA}</Name>: the best available protonation
              constant from the column <FieldRef
              table="best_compound_protonation_pka" field="pka"/>, decided by the
              maximum value in <FieldRef
              table="best_compound_protonation_pka" field="reliability"/>, where the
              FTSA experiment temperature is within \SI{2}{\celsius}
              from the temperature at which pK_{a,SA} was determined,
              as specified in <FieldRef
              table="best_compound_protonation_pka" field="temperature"/>
            </Variable>
            <Variable>
              <Name>pK_{a,CA}</Name>: the best available protein
              protonation constant from the column <FieldRef
              table="best_protein_protonation_pka" field="pka_zn"/>, having the
              largest reliability value and measurement temperature
              <FieldRef table="best_protein_protonation_pka" field="temperature"/>
              within \SI{2}{\celsius} from the temperature at which
              the K_{b,obs} determination was performed (<FieldRef
              table="experiment_tsa" field="temperature"/>).
            </Variable>
          </Variables>
          <FormulaSource>
            <doi>10.1017/S0033583518000082</doi>
            <uri>https://doi.org/10.1017%2FS0033583518000082</uri>
            <part type="equation">11</part>
            <equation>11</equation>
          </FormulaSource>
        </Primary>
      </Formula>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="dbg_int">
      <Title>Δ<i>G</i><sub>b,int</sub></Title>
      <Definition>Intrinsic Δ<i>G</i><sub>b</sub> value</Definition>
      <Units>kJ/mol</Units>
      <Formula>
        <Primary>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
            <mrow>
              <msub>
                <mrow>
                  <mi>Δ</mi>
                  <mi>G</mi>
                </mrow>
                <mrow>
                  <mi>b</mi>
                  <mo>,</mo>
                  <mi>i</mi>
                  <mi>n</mi>
                  <mi>t</mi>
                </mrow>
              </msub>
              <mo>=</mo>
              <mrow>
                <mi>-</mi>
                <mi>R</mi>
                <mi>T</mi>
                <mo>ln</mo>
              </mrow>
              <mo stretchy="false">(</mo>
              <msub>
                <mrow>
                  <mi>K</mi>
                </mrow>
                <mrow>
                  <mi>b</mi>
                  <mo>,</mo>
                  <mi>i</mi>
                  <mi>n</mi>
                  <mi>t</mi>
                </mrow>
              </msub>
              <mo stretchy="false">)</mo>
            </mrow>
          </math>
          <Variables>
            <Variable>
              <Name>ΔG_{b,int}</Name>: intrinsic binding Gibbs energy 
            </Variable>
            <Variable>
              <Name>K_{b,int}</Name>: intrinsic binding constant value
              <FieldRef table="intrinsic_parameters" field="kb_int"/>
            </Variable>
          </Variables>
          <FormulaSource>
            <doi>10.1017/S0033583518000082</doi>
            <uri>https://doi.org/10.1017%2FS0033583518000082</uri>
            <part type="equation">12</part>
            <equation>12</equation>
          </FormulaSource>
        </Primary>
      </Formula>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="sigdbg_int">
      <Title>σ<sub>Δ<i>G</i><sub>b,int</sub></sub></Title>
      <Definition>Standard deviation of intrinsic Δ<i>G</i><sub>b</sub> value</Definition>
      <Units>kJ/mol</Units>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="dbh_int">
      <Title>Δ<i>H</i><sub>b,int</sub></Title>
      <Definition>Intrinsic Δ<i>H</i><sub>b</sub> value</Definition>
      <Units>kJ/mol</Units>
      <Formula>
        <Primary>
          <math xmlns="http://www.w3.org/1998/Math/MathML">
            <mrow>
              <mrow>
                <mi mathvariant="normal">Δ</mi>
              </mrow>
              <msub>
                <mi>H</mi>
                <mrow>
                  <mi>i</mi>
                  <mi>n</mi>
                  <mi>t</mi>
                </mrow>
              </msub>
              <mo>=</mo>
              <mrow>
                <mi mathvariant="normal">Δ</mi>
              </mrow>
              <msub>
                <mi>H</mi>
                <mrow>
                  <mi>o</mi>
                  <mi>b</mi>
                  <mi>s</mi>
                </mrow>
              </msub>
              <mo>+</mo>
              <mfrac>
                <mrow>
                  <mrow>
                    <mi mathvariant="normal">Δ</mi>
                  </mrow>
                  <msub>
                    <mi>H</mi>
                    <mrow>
                      <mi>p</mi>
                      <mi>r</mi>
                      <mo separator="true">,</mo>
                      <mi>S</mi>
                      <mi>A</mi>
                    </mrow>
                  </msub>
                  <mo>−</mo>
                  <mrow>
                    <mi mathvariant="normal">Δ</mi>
                  </mrow>
                  <msub>
                    <mi>H</mi>
                    <mrow>
                      <mi>p</mi>
                      <mi>r</mi>
                      <mo separator="true">,</mo>
                      <mi>b</mi>
                      <mi>u</mi>
                      <mi>f</mi>
                    </mrow>
                  </msub>
                </mrow>
                <mrow>
                  <mn>1</mn>
                  <mo>+</mo>
                  <mn>1</mn>
                  <msup>
                    <mn>0</mn>
                    <mrow>
                      <mi>p</mi>
                      <mi>H</mi>
                      <mo>−</mo>
                      <mi>p</mi>
                      <msub>
                        <mi>K</mi>
                        <mrow>
                          <mi>a</mi>
                          <mo separator="true">,</mo>
                          <mi>S</mi>
                          <mi>A</mi>
                        </mrow>
                      </msub>
                    </mrow>
                  </msup>
                </mrow>
              </mfrac>
              <mo>−</mo>
              <mfrac>
                <mrow>
                  <mrow>
                    <mi mathvariant="normal">Δ</mi>
                  </mrow>
                  <msub>
                    <mi>H</mi>
                    <mrow>
                      <mi>p</mi>
                      <mi>r</mi>
                      <mo separator="true">,</mo>
                      <mi>C</mi>
                      <mi>A</mi>
                    </mrow>
                  </msub>
                  <mo>−</mo>
                  <mrow>
                    <mi mathvariant="normal">Δ</mi>
                  </mrow>
                  <msub>
                    <mi>H</mi>
                    <mrow>
                      <mi>p</mi>
                      <mi>r</mi>
                      <mo separator="true">,</mo>
                      <mi>b</mi>
                      <mi>u</mi>
                      <mi>f</mi>
                    </mrow>
                  </msub>
                </mrow>
                <mrow>
                  <mn>1</mn>
                  <mo>+</mo>
                  <mn>1</mn>
                  <msup>
                    <mn>0</mn>
                    <mrow>
                      <mi>p</mi>
                      <msub>
                        <mi>K</mi>
                        <mrow>
                          <mi>a</mi>
                          <mo separator="true">,</mo>
                          <mi>C</mi>
                          <mi>A</mi>
                        </mrow>
                      </msub>
                      <mo>−</mo>
                      <mi>p</mi>
                      <mi>H</mi>
                    </mrow>
                  </msup>
                </mrow>
              </mfrac>
            </mrow>
          </math>
          <Variables>
            <Variable>
              <Name>\Delta H_{int}</Name>: intrinsic enthalpy
            </Variable>
            <Variable>
              <Name>\Delta H_{obs}</Name>: observed enthalpy
              <FieldRef table="experiment_itc" field="dbh_obs"/>
            </Variable>
            <Variable>
              <Name>\Delta H_{pr,SA}</Name>: Protonation enthalpy of sulfonamide
              <FieldRef table="compound_protonation_dah" field="dah"/>
            </Variable> 
            <Variable>
              <Name>\Delta H_{pr,buf}</Name>: Protonation enthalpy of buffer
              <FieldRef table="buffer_protonation_dah" field="dah"/>
            </Variable>
            <Variable>
              <Name>pH</Name>: pH value taken from the 
              <FieldRef table="experiment_tsa" field="ph"/>   
            </Variable>
            <Variable>
              <Name>pK_{a,SA}</Name>: the best available protonation
              constant from the column <FieldRef
              table="compound_protonation_pka" field="pka"/>, decided by the
              maximum value in <FieldRef
              table="compound_protonation_pka" field="reliability"/>, where the
              FTSA experiment temperature is within \SI{2}{\celsius}
              from the temperature at which pK_{a,SA} was determined,
              as specified in <FieldRef
              table="compound_protonation_pka" field="temperature"/>
            </Variable>
            <Variable>
              <Name>\Delta H_{pr,CA}</Name>: Protonation enthalpy of CA
              <FieldRef table="protein_protonation_dah" field="dah_zn"/>
            </Variable> 
            <Variable>
              <Name>pK_{a,CA}</Name>: the best available protein
              protonation constant from the column <FieldRef
              table="protein_protonation_pka" field="pka_zn"/>, having the
              largest reliability value and measurement temperature
              <FieldRef table="protein_protonation_pka" field="temperature"/>
              within \SI{2}{\celsius} from the temperature at which
              the K_{b,obs} determination was performed (<FieldRef
              table="experiment_tsa" field="temperature"/>).
            </Variable>       
          </Variables>
          <FormulaSource>
            <doi>10.1017/S0033583518000082</doi>
            <uri>https://doi.org/10.1017%2FS0033583518000082</uri>
            <part type="equation">13</part>
            <equation>13</equation>
          </FormulaSource>
        </Primary>
      </Formula>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="sigdbh_int">
      <Title>σ<sub>Δ<i>H</i><sub>b,int</sub></sub></Title>
      <Definition>Standard deviation of intrinsic Δ<i>H</i><sub>b</sub> value</Definition>
      <Units>kJ/mol</Units>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="best_intrinsic_tsa_ids">
      <Title>FTSA source</Title>
      <Definition>FTSA source</Definition>
    </Field>
    <Field name="best_intrinsic_itc_ids">
      <Title>ITC source</Title>
      <Definition>ITC source</Definition>
    </Field>   
    <Field name="temperature">
      <Title><i>T</i></Title>
      <Definition>Temperature</Definition>
      <Explanation>Temperature of the experiment</Explanation>
      <Units>°C</Units>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="min_q">
      <Title>Q<sub>ITC<sub>param.</sub></sub></Title>
      <Definition>Reliability</Definition>
    </Field>
    <Field name="reliability">
      <Title>Q<sub>ITC</sub></Title>
      <Definition>Reliability</Definition>
    </Field>
    <Field name="n">
      <Title>N<sub>ITC</sub></Title>
      <Definition>Number</Definition>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        ip.revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL" dialect="MySQL">
      FROM `BVTS`.`intrinsic_parameters` AS ip
        JOIN `BVTS`.`compound` AS c ON c.id = ip.compound_id
        JOIN `BVTS`.`protein_batch_view` AS pbv ON pbv.protein_id = ip.protein_id
      WHERE ip.public = 1
      GROUP BY protein_id, compound_id, temperature, best_intrinsic_tsa_ids, best_intrinsic_itc_ids, reliability
    </Selection>
    <RestfulDB:FKRepresentation>%(compound_id)s - %(protein_id)s</RestfulDB:FKRepresentation>
  </Table>
<!-- Thermodynamic parameters -->
  <Table name="kb_int_tsa_all_cas" is_view="true" readonly="true">
    <Title><i>K</i><sub>b,int</sub></Title>
    <Description>Intrinsic binding constants (calculated from FTSA and protonation data)</Description>
    <Explanation>
      Intrinsic binding constants (calculated from FTSA and protonation) for 
      all carbonic anhydrase isozymes in one table. Selection of columns performed by 
      <bold>primary group</bold> stated in <bold>protein</bold> table.
    </Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Compound ID</Definition>
      <Explanation>Compound ID</Explanation>
      <Code language="SQL" dialect="MySQL">
        concat_ws('-', c.id, temperature)
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="name">
      <Title>Cmpd name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of compound</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.name
      </Code>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula image file</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.formula_file
      </Code>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="temperature"> 
      <Title><i>T</i></Title>
      <Definition>Temperature</Definition>
      <Explanation>Temperature of the experiment</Explanation>
      <Units>°C</Units>
      <Code language="SQL" dialect="MySQL">
        temperature
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.0f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca01"> 
      <Title>CA I</Title>
      <Definition>Carbonic anhydrase I intrinsic binding constant</Definition>
      <Explanation>Carbonic anhydrase I intrinsic binding constant</Explanation>
      <Units>M<sup>-1</sup></Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca01)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca02"> 
      <Title>CA II</Title>
      <Definition>Carbonic anhydrase II intrinsic binding constant</Definition>
      <Explanation>Carbonic anhydrase II intrinsic binding constant</Explanation>
      <Units>M<sup>-1</sup></Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca02)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca03"> 
      <Title>CA III</Title>
      <Definition>Carbonic anhydrase III intrinsic binding constant</Definition>
      <Explanation>Carbonic anhydrase III intrinsic binding constant</Explanation>
      <Units>M<sup>-1</sup></Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca03)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca04"> 
      <Title>CA IV</Title>
      <Definition>Carbonic anhydrase IV intrinsic binding constant</Definition>
      <Explanation>Carbonic anhydrase IV intrinsic binding constant</Explanation>
      <Units>M<sup>-1</sup></Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca04)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca05a"> 
      <Title>CA VA</Title>
      <Definition>Carbonic anhydrase VA intrinsic binding constant</Definition>
      <Explanation>Carbonic anhydrase VA intrinsic binding constant</Explanation>
      <Units>M<sup>-1</sup></Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca05a)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca05b"> 
      <Title>CA VB</Title>
      <Definition>Carbonic anhydrase VB intrinsic binding constant</Definition>
      <Explanation>Carbonic anhydrase VB intrinsic binding constant</Explanation>
      <Units>M<sup>-1</sup></Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca05b)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca06"> 
      <Title>CA VI</Title>
      <Definition>Carbonic anhydrase VI intrinsic binding constant</Definition>
      <Explanation>Carbonic anhydrase VI intrinsic binding constant</Explanation>
      <Units>M<sup>-1</sup></Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca06)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca07"> 
      <Title>CA VII</Title>
      <Definition>Carbonic anhydrase VII intrinsic binding constant</Definition>
      <Explanation>Carbonic anhydrase VII intrinsic binding constant</Explanation>
      <Units>M<sup>-1</sup></Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca07)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca09"> 
      <Title>CA IX</Title>
      <Definition>Carbonic anhydrase IX intrinsic binding constant</Definition>
      <Explanation>Carbonic anhydrase IX intrinsic binding constant</Explanation>
      <Units>M<sup>-1</sup></Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca09)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca12"> 
      <Title>CA XII</Title>
      <Definition>Carbonic anhydrase XII intrinsic binding constant</Definition>
      <Explanation>Carbonic anhydrase XII intrinsic binding constant</Explanation>
      <Units>M<sup>-1</sup></Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca12)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca13"> 
      <Title>CA XIII</Title>
      <Definition>Carbonic anhydrase XIII intrinsic binding constant</Definition>
      <Explanation>Carbonic anhydrase XIII intrinsic binding constant</Explanation>
      <Units>M<sup>-1</sup></Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca13)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca14"> 
      <Title>CA XIV</Title>
      <Definition>Carbonic anhydrase XIV intrinsic binding constant</Definition>
      <Explanation>Carbonic anhydrase XIV intrinsic binding constant</Explanation>
      <Units>M<sup>-1</sup></Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca14)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.2g
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <SQLDataType>text</SQLDataType>      
    </Field>
    <Field name="compound_id">
      <Title>Cmpd ID</Title>
      <Definition>Compound ID in main database</Definition>
      <Explanation>Compound ID in main database</Explanation>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        c.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        max(iptu.revision_id)
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM
          (
              `BVTS`.compound AS c
          JOIN(
              SELECT
                  kb_int AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
              FROM
                  `BVTS`.intrinsic_parameters_tsa AS ipt
              JOIN `BVTS`.protein AS p
              ON
                  p.id = ipt.protein_id
              WHERE
                  ipt.public = 1 AND p.primary_group_label = 'PG-0001'
              UNION
          SELECT NULL AS
              ca01,
              kb_int AS ca02,
              NULL AS ca03,
              NULL AS ca04,
              NULL AS ca05a,
              NULL AS ca05b,
              NULL AS ca06,
              NULL AS ca07,
              NULL AS ca09,
              NULL AS ca12,
              NULL AS ca13,
              NULL AS ca14,
              temperature AS temperature,
              compound_id AS compound_id,
              ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
          JOIN `BVTS`.protein AS p
          ON
              p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0002'
          UNION
      SELECT NULL AS
          ca01,
          NULL AS ca02,
          kb_int AS ca03,
          NULL AS ca04,
          NULL AS ca05a,
          NULL AS ca05b,
          NULL AS ca06,
          NULL AS ca07,
          NULL AS ca09,
          NULL AS ca12,
          NULL AS ca13,
          NULL AS ca14,
          temperature AS temperature,
          compound_id AS compound_id,
          ipt.revision_id AS revision_id
      FROM
          `BVTS`.intrinsic_parameters_tsa AS ipt
      JOIN `BVTS`.protein AS p
      ON
          p.id = ipt.protein_id
      WHERE
          ipt.public = 1 AND p.primary_group_label = 'PG-0003'
      UNION
      SELECT NULL AS
          ca01,
          NULL AS ca02,
          NULL AS ca03,
          kb_int AS ca04,
          NULL AS ca05a,
          NULL AS ca05b,
          NULL AS ca06,
          NULL AS ca07,
          NULL AS ca09,
          NULL AS ca12,
          NULL AS ca13,
          NULL AS ca14,
          temperature AS temperature,
          compound_id AS compound_id,
          ipt.revision_id AS revision_id
      FROM
          `BVTS`.intrinsic_parameters_tsa AS ipt
      JOIN `BVTS`.protein AS p
      ON
          p.id = ipt.protein_id
      WHERE
          ipt.public = 1 AND p.primary_group_label = 'PG-0004'
      UNION
      SELECT NULL AS
          ca01,
          NULL AS ca02,
          NULL AS ca03,
          NULL AS ca04,
          kb_int AS ca05a,
          NULL AS ca05b,
          NULL AS ca06,
          NULL AS ca07,
          NULL AS ca09,
          NULL AS ca12,
          NULL AS ca13,
          NULL AS ca14,
          temperature AS temperature,
          compound_id AS compound_id,
          ipt.revision_id AS revision_id
      FROM
          `BVTS`.intrinsic_parameters_tsa AS ipt
      JOIN `BVTS`.protein AS p
      ON
          p.id = ipt.protein_id
      WHERE
          ipt.public = 1 AND p.primary_group_label = 'PG-0005'
      UNION
      SELECT NULL AS
          ca01,
          NULL AS ca02,
          NULL AS ca03,
          NULL AS ca04,
          NULL AS ca05a,
          kb_int AS ca05b,
          NULL AS ca06,
          NULL AS ca07,
          NULL AS ca09,
          NULL AS ca12,
          NULL AS ca13,
          NULL AS ca14,
          temperature AS temperature,
          compound_id AS compound_id,
          ipt.revision_id AS revision_id
      FROM
          `BVTS`.intrinsic_parameters_tsa AS ipt
      JOIN `BVTS`.protein AS p
      ON
          p.id = ipt.protein_id
      WHERE
          ipt.public = 1 AND p.primary_group_label = 'PG-0006'
      UNION
      SELECT NULL AS
          ca01,
          NULL AS ca02,
          NULL AS ca03,
          NULL AS ca04,
          NULL AS ca05a,
          NULL AS ca05b,
          kb_int AS ca06,
          NULL AS ca07,
          NULL AS ca09,
          NULL AS ca12,
          NULL AS ca13,
          NULL AS ca14,
          temperature AS temperature,
          compound_id AS compound_id,
          ipt.revision_id AS revision_id
      FROM
          `BVTS`.intrinsic_parameters_tsa AS ipt
      JOIN `BVTS`.protein AS p
      ON
          p.id = ipt.protein_id
      WHERE
          ipt.public = 1 AND p.primary_group_label = 'PG-0007'
      UNION
      SELECT NULL AS
          ca01,
          NULL AS ca02,
          NULL AS ca03,
          NULL AS ca04,
          NULL AS ca05a,
          NULL AS ca05b,
          NULL AS ca06,
          kb_int AS ca07,
          NULL AS ca09,
          NULL AS ca12,
          NULL AS ca13,
          NULL AS ca14,
          temperature AS temperature,
          compound_id AS compound_id,
          ipt.revision_id AS revision_id
      FROM
          `BVTS`.intrinsic_parameters_tsa AS ipt
      JOIN `BVTS`.protein AS p
      ON
          p.id = ipt.protein_id
      WHERE
          ipt.public = 1 AND p.primary_group_label = 'PG-0008'
      UNION
      SELECT NULL AS
          ca01,
          NULL AS ca02,
          NULL AS ca03,
          NULL AS ca04,
          NULL AS ca05a,
          NULL AS ca05b,
          NULL AS ca06,
          NULL AS ca07,
          kb_int AS ca09,
          NULL AS ca12,
          NULL AS ca13,
          NULL AS ca14,
          temperature AS temperature,
          compound_id AS compound_id,
          ipt.revision_id AS revision_id
      FROM
          `BVTS`.intrinsic_parameters_tsa AS ipt
      JOIN `BVTS`.protein AS p
      ON
          p.id = ipt.protein_id
      WHERE
          ipt.public = 1 AND p.primary_group_label = 'PG-0009'
      UNION
      SELECT NULL AS
          ca01,
          NULL AS ca02,
          NULL AS ca03,
          NULL AS ca04,
          NULL AS ca05a,
          NULL AS ca05b,
          NULL AS ca06,
          NULL AS ca07,
          NULL AS ca09,
          kb_int AS ca12,
          NULL AS ca13,
          NULL AS ca14,
          temperature AS temperature,
          compound_id AS compound_id,
          ipt.revision_id AS revision_id
      FROM
          `BVTS`.intrinsic_parameters_tsa AS ipt
      JOIN `BVTS`.protein AS p
      ON
          p.id = ipt.protein_id
      WHERE
          ipt.public = 1 AND p.primary_group_label = 'PG-0010'
      UNION
      SELECT NULL AS
          ca01,
          NULL AS ca02,
          NULL AS ca03,
          NULL AS ca04,
          NULL AS ca05a,
          NULL AS ca05b,
          NULL AS ca06,
          NULL AS ca07,
          NULL AS ca09,
          NULL AS ca12,
          kb_int AS ca13,
          NULL AS ca14,
          temperature AS temperature,
          compound_id AS compound_id,
          ipt.revision_id AS revision_id
      FROM
          `BVTS`.intrinsic_parameters_tsa AS ipt
      JOIN `BVTS`.protein AS p
      ON
          p.id = ipt.protein_id
      WHERE
          ipt.public = 1 AND p.primary_group_label = 'PG-0011'
      UNION
      SELECT NULL AS
          ca01,
          NULL AS ca02,
          NULL AS ca03,
          NULL AS ca04,
          NULL AS ca05a,
          NULL AS ca05b,
          NULL AS ca06,
          NULL AS ca07,
          NULL AS ca09,
          NULL AS ca12,
          NULL AS ca13,
          kb_int AS ca14,
          temperature AS temperature,
          compound_id AS compound_id,
          ipt.revision_id AS revision_id
      FROM
          `BVTS`.intrinsic_parameters_tsa AS ipt
      JOIN `BVTS`.protein AS p
      ON
          p.id = ipt.protein_id
      WHERE
          ipt.public = 1 AND p.primary_group_label = 'PG-0012'
          ) AS iptu
      ON
          (c.id = iptu.compound_id)
          )
      GROUP BY
          c.id,
          iptu.temperature
      ORDER BY
          c.id
    </Selection>
    <UniqueKey>
      <Field>name</Field>
      <Field>temperature</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(name)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="kd_obs_tsa_all_cas" is_view="true" readonly="true">
    <Title><i>K</i><sub>d,obs</sub></Title>
    <Description>Observed dissociation constants (from FTSA experiments data)</Description>
    <Explanation>
      Observed dissociation constants (from FTSA experiments) for 
      all carbonic anhydrase isoforms in one table. Selection of columns performed by 
      <bold>primary group</bold> stated in <bold>protein</bold> table.
    </Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Compound ID</Definition>
      <Explanation>Compound ID</Explanation>
      <Code language="SQL" dialect="MySQL">
        concat_ws('-', c.id, temperature)
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="name">
      <Title>Cmpd name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of compound</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.name
      </Code>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula image file</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.formula_file
      </Code>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="temperature"> 
      <Title><i>T</i></Title>
      <Definition>Temperature</Definition>
      <Explanation>Temperature of the experiment</Explanation>
      <Units>°C</Units>
      <Code language="SQL" dialect="MySQL">
        temperature
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.0f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca01"> 
      <Title>CA I</Title>
      <Definition>Carbonic anhydrase I observed dissociation constant</Definition>
      <Explanation>Carbonic anhydrase I observed dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca01)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca02"> 
      <Title>CA II</Title>
      <Definition>Carbonic anhydrase II observed dissociation constant</Definition>
      <Explanation>Carbonic anhydrase II observed dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca02)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca03"> 
      <Title>CA III</Title>
      <Definition>Carbonic anhydrase III observed dissociation constant</Definition>
      <Explanation>Carbonic anhydrase III observed dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca03)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca04"> 
      <Title>CA IV</Title>
      <Definition>Carbonic anhydrase IV observed dissociation constant</Definition>
      <Explanation>Carbonic anhydrase IV observed dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca04)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca05a"> 
      <Title>CA VA</Title>
      <Definition>Carbonic anhydrase VA observed dissociation constant</Definition>
      <Explanation>Carbonic anhydrase VA observed dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca05a)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca05b"> 
      <Title>CA VB</Title>
      <Definition>Carbonic anhydrase VB observed dissociation constant</Definition>
      <Explanation>Carbonic anhydrase VB observed dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca05b)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca06"> 
      <Title>CA VI</Title>
      <Definition>Carbonic anhydrase VI observed dissociation constant</Definition>
      <Explanation>Carbonic anhydrase VI observed dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca06)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca07"> 
      <Title>CA VII</Title>
      <Definition>Carbonic anhydrase VII observed dissociation constant</Definition>
      <Explanation>Carbonic anhydrase VII observed dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca07)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca09"> 
      <Title>CA IX</Title>
      <Definition>Carbonic anhydrase IX observed dissociation constant</Definition>
      <Explanation>Carbonic anhydrase IX observed dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca09)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca12"> 
      <Title>CA XII</Title>
      <Definition>Carbonic anhydrase XII observed dissociation constant</Definition>
      <Explanation>Carbonic anhydrase XII observed dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca12)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca13"> 
      <Title>CA XIII</Title>
      <Definition>Carbonic anhydrase XIII observed dissociation constant</Definition>
      <Explanation>Carbonic anhydrase XIII observed dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca13)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca14"> 
      <Title>CA XIV</Title>
      <Definition>Carbonic anhydrase XIV observed dissociation constant</Definition>
      <Explanation>Carbonic anhydrase XIV observed dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca14)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <SQLDataType>text</SQLDataType>      
    </Field>
    <Field name="compound_id">
      <Title>Cmpd ID</Title>
      <Definition>Compound ID in main database</Definition>
      <Explanation>Compound ID in main database</Explanation>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        c.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        max(ept.revision_id)
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM
          (`BVTS`.compound AS c
          JOIN (SELECT 
               etsa.kb_obs AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0001'  UNION SELECT 
              NULL AS ca01,
                   etsa.kb_obs AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0002'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                   etsa.kb_obs AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0003'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                   etsa.kb_obs AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0004'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                   etsa.kb_obs AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0005'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                   etsa.kb_obs AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0006'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                   etsa.kb_obs AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0007'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                   etsa.kb_obs AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0008'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                   etsa.kb_obs AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0009'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                   etsa.kb_obs AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0010'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                   etsa.kb_obs AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0011'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                   etsa.kb_obs AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0012') ept ON (c.name = ept.compound_name))
      GROUP BY c.id , ept.temperature
      ORDER BY c.id
    </Selection>
    <UniqueKey>
      <Field>name</Field>
      <Field>temperature</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(name)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="kd_int_tsa_all_cas" is_view="true" readonly="true">
    <Title><i>K</i><sub>d,int</sub></Title>
    <Description>Intrinsic dissociation constants (calculated from FTSA and protonation data)</Description>
    <Explanation>
      Intrinsic dissociation constants (calculated from FTSA and protonation) for 
      all carbonic anhydrase isoforms in one table. Selection of columns performed by 
      <bold>primary group</bold> stated in <bold>protein</bold> table.
    </Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Compound ID</Definition>
      <Explanation>Compound ID</Explanation>
      <Code language="SQL" dialect="MySQL">
        concat_ws('-', c.id, temperature)
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="name">
      <Title>Cmpd name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of compound</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.name
      </Code>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula image file</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.formula_file
      </Code>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="temperature"> 
      <Title><i>T</i></Title>
      <Definition>Temperature</Definition>
      <Explanation>Temperature of the experiment</Explanation>
      <Units>°C</Units>
      <Code language="SQL" dialect="MySQL">
        temperature
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.0f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca01"> 
      <Title>CA I</Title>
      <Definition>Carbonic anhydrase I intrinsic dissociation constant</Definition>
      <Explanation>Carbonic anhydrase I intrinsic dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca01)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca02"> 
      <Title>CA II</Title>
      <Definition>Carbonic anhydrase II intrinsic dissociation constant</Definition>
      <Explanation>Carbonic anhydrase II intrinsic dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca02)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca03"> 
      <Title>CA III</Title>
      <Definition>Carbonic anhydrase III intrinsic dissociation constant</Definition>
      <Explanation>Carbonic anhydrase III intrinsic dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca03)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca04"> 
      <Title>CA IV</Title>
      <Definition>Carbonic anhydrase IV intrinsic dissociation constant</Definition>
      <Explanation>Carbonic anhydrase IV intrinsic dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca04)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca05a"> 
      <Title>CA VA</Title>
      <Definition>Carbonic anhydrase VA intrinsic dissociation constant</Definition>
      <Explanation>Carbonic anhydrase VA intrinsic dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca05a)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca05b"> 
      <Title>CA VB</Title>
      <Definition>Carbonic anhydrase VB intrinsic dissociation constant</Definition>
      <Explanation>Carbonic anhydrase VB intrinsic dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca05b)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca06"> 
      <Title>CA VI</Title>
      <Definition>Carbonic anhydrase VI intrinsic dissociation constant</Definition>
      <Explanation>Carbonic anhydrase VI intrinsic dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca06)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca07"> 
      <Title>CA VII</Title>
      <Definition>Carbonic anhydrase VII intrinsic dissociation constant</Definition>
      <Explanation>Carbonic anhydrase VII intrinsic dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca07)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca09"> 
      <Title>CA IX</Title>
      <Definition>Carbonic anhydrase IX intrinsic dissociation constant</Definition>
      <Explanation>Carbonic anhydrase IX intrinsic dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca09)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca12"> 
      <Title>CA XII</Title>
      <Definition>Carbonic anhydrase XII intrinsic dissociation constant</Definition>
      <Explanation>Carbonic anhydrase XII intrinsic dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca12)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca13"> 
      <Title>CA XIII</Title>
      <Definition>Carbonic anhydrase XIII intrinsic dissociation constant</Definition>
      <Explanation>Carbonic anhydrase XIII intrinsic dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca13)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca14"> 
      <Title>CA XIV</Title>
      <Definition>Carbonic anhydrase XIV intrinsic dissociation constant</Definition>
      <Explanation>Carbonic anhydrase XIV intrinsic dissociation constant</Explanation>
      <Units>M</Units>
      <Code language="SQL" dialect="MySQL">
        avg(1/ca14)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %9.1e
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <SQLDataType>text</SQLDataType>      
    </Field>
    <Field name="compound_id">
      <Title>Cmpd ID</Title>
      <Definition>Compound ID in main database</Definition>
      <Explanation>Compound ID in main database</Explanation>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        c.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        max(iptu.revision_id)
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM
          (`BVTS`.compound AS c
          JOIN (SELECT 
              kb_int AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0001' UNION SELECT 
              NULL AS ca01,
                  kb_int AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0002' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  kb_int AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0003' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  kb_int AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0004' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  kb_int AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0005' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  kb_int AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0006' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  kb_int AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0007' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  kb_int AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0008' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  kb_int AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0009' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  kb_int AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0010' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  kb_int AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0011' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  kb_int AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0012') 
              AS iptu ON (c.id = iptu.compound_id))
      GROUP BY c.id , iptu.temperature
      ORDER BY c.id
    </Selection>
    <UniqueKey>
      <Field>name</Field>
      <Field>temperature</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(name)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="dbg_obs_tsa_all_cas" is_view="true" readonly="true">
    <Title>Δ<i>G</i><sub>b,obs</sub></Title>
    <Description>The observed Gibbs energy changes upon binding (from FTSA experiments)</Description>
    <Explanation>
      The observed Gibbs energy changes upon binding (from FTSA experiments) for all 
      carbonic anhydrase isoforms. Selection of columns performed by 
      <bold>primary group</bold> stated in <bold>protein</bold> table.
    </Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Compound ID</Definition>
      <Explanation>Compound ID</Explanation>
      <Code language="SQL" dialect="MySQL">
        concat_ws('-', c.id, temperature)
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="name">
      <Title>Cmpd name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of compound</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.name
      </Code>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula image file</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.formula_file
      </Code>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="temperature"> 
      <Title><i>T</i></Title>
      <Definition>Temperature</Definition>
      <Explanation>Temperature of the experiment</Explanation>
      <Units>°C</Units>
      <Code language="SQL" dialect="MySQL">
        temperature
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.0f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca01"> 
      <Title>CA I</Title>
      <Definition>Carbonic anhydrase I observed Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase I observed Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(-8.31446 * (ept.temperature + 273.15) * ln(ept.ca01) / 1000) -- in kJ/(mol*K)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca02"> 
      <Title>CA II</Title>
      <Definition>Carbonic anhydrase II observed Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase II observed Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(-8.31446 * (ept.temperature + 273.15) * ln(ept.ca02) / 1000) -- in kJ/(mol*K)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca03"> 
      <Title>CA III</Title>
      <Definition>Carbonic anhydrase III observed Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase III observed Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(-8.31446 * (ept.temperature + 273.15) * ln(ept.ca03) / 1000) -- in kJ/(mol*K)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca04"> 
      <Title>CA IV</Title>
      <Definition>Carbonic anhydrase IV observed Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase IV observed Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(-8.31446 * (ept.temperature + 273.15) * ln(ept.ca04) / 1000) -- in kJ/(mol*K)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca05a"> 
      <Title>CA VA</Title>
      <Definition>Carbonic anhydrase VA observed Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase VA observed Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(-8.31446 * (ept.temperature + 273.15) * ln(ept.ca05a) / 1000) -- in kJ/(mol*K)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca05b"> 
      <Title>CA VB</Title>
      <Definition>Carbonic anhydrase VB observed Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase VB observed Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(-8.31446 * (ept.temperature + 273.15) * ln(ept.ca05b) / 1000) -- in kJ/(mol*K)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca06"> 
      <Title>CA VI</Title>
      <Definition>Carbonic anhydrase VI observed Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase VI observed Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(-8.31446 * (ept.temperature + 273.15) * ln(ept.ca06) / 1000) -- in kJ/(mol*K)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca07"> 
      <Title>CA VII</Title>
      <Definition>Carbonic anhydrase VII observed Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase VII observed Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(-8.31446 * (ept.temperature + 273.15) * ln(ept.ca07) / 1000) -- in kJ/(mol*K)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca09"> 
      <Title>CA IX</Title>
      <Definition>Carbonic anhydrase IX observed Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase IX observed Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(-8.31446 * (ept.temperature + 273.15) * ln(ept.ca09) / 1000) -- in kJ/(mol*K)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca12"> 
      <Title>CA XII</Title>
      <Definition>Carbonic anhydrase XII observed Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase XII observed Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(-8.31446 * (ept.temperature + 273.15) * ln(ept.ca12) / 1000) -- in kJ/(mol*K)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca13"> 
      <Title>CA XIII</Title>
      <Definition>Carbonic anhydrase XIII observed Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase XIII observed Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(-8.31446 * (ept.temperature + 273.15) * ln(ept.ca13) / 1000) -- in kJ/(mol*K)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca14"> 
      <Title>CA XIV</Title>
      <Definition>Carbonic anhydrase XIV observed Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase XIV observed Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(-8.31446 * (ept.temperature + 273.15) * ln(ept.ca14) / 1000) -- in kJ/(mol*K)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <SQLDataType>text</SQLDataType>      
    </Field>
    <Field name="compound_id">
      <Title>Cmpd ID</Title>
      <Definition>Compound ID in main database</Definition>
      <Explanation>Compound ID in main database</Explanation>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        c.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        max(ept.revision_id)
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM
          (`BVTS`.compound AS c
          JOIN (SELECT 
               etsa.kb_obs AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0001'  UNION SELECT 
              NULL AS ca01,
                   etsa.kb_obs AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0002'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                   etsa.kb_obs AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0003'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                   etsa.kb_obs AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0004'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                   etsa.kb_obs AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0005'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                   etsa.kb_obs AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0006'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                   etsa.kb_obs AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0007'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                   etsa.kb_obs AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0008'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                   etsa.kb_obs AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0009'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                   etsa.kb_obs AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0010'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                   etsa.kb_obs AS ca13,
                  NULL AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0011'  UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                   etsa.kb_obs AS ca14,
                   etsa.temperature AS temperature,
                   etsa.compound_name AS compound_name,
                   etsa.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS etsa
          WHERE
               etsa.public = 1
                  AND etsa.primary_group_label = 'PG-0012') ept ON (c.name = ept.compound_name))
      GROUP BY c.id , ept.temperature
      ORDER BY c.id
    </Selection>
    <UniqueKey>
      <Field>name</Field>
      <Field>temperature</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(name)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="dbg_int_tsa_all_cas" is_view="true" readonly="true">
    <Title>Δ<i>G</i><sub>b,int</sub></Title>
    <Description>The intrinsic Gibbs energy changes upon binding (calculated from FTSA and protonation data)</Description>
    <Explanation>
      The intrinsic Gibbs energy changes upon protein-ligand binding (calculated from FTSA and protonation) for 
      all carbonic anhydrase isoforms. Selection of columns performed by 
      <bold>primary group</bold> stated in <bold>protein</bold> table.
    </Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Compound ID</Definition>
      <Explanation>Compound ID</Explanation>
      <Code language="SQL" dialect="MySQL">
        concat_ws('-', c.id, temperature)
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="name">
      <Title>Cmpd name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of compound</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.name
      </Code>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula image file</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.formula_file
      </Code>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="temperature"> 
      <Title><i>T</i></Title>
      <Definition>Temperature</Definition>
      <Explanation>Temperature of the experiment</Explanation>
      <Units>°C</Units>
      <Code language="SQL" dialect="MySQL">
        temperature
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.0f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca01"> 
      <Title>CA I</Title>
      <Definition>Carbonic anhydrase I intrinsic Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase I intrinsic Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca01)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca02"> 
      <Title>CA II</Title>
      <Definition>Carbonic anhydrase II intrinsic Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase II intrinsic Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca02)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca03"> 
      <Title>CA III</Title>
      <Definition>Carbonic anhydrase III intrinsic Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase III intrinsic Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca03)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca04"> 
      <Title>CA IV</Title>
      <Definition>Carbonic anhydrase IV intrinsic Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase IV intrinsic Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca04)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca05a"> 
      <Title>CA VA</Title>
      <Definition>Carbonic anhydrase VA intrinsic Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase VA intrinsic Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca05a)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca05b"> 
      <Title>CA VB</Title>
      <Definition>Carbonic anhydrase VB intrinsic Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase VB intrinsic Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca05b)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca06"> 
      <Title>CA VI</Title>
      <Definition>Carbonic anhydrase VI intrinsic Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase VI intrinsic Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca06)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca07"> 
      <Title>CA VII</Title>
      <Definition>Carbonic anhydrase VII intrinsic Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase VII intrinsic Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca07)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca09"> 
      <Title>CA IX</Title>
      <Definition>Carbonic anhydrase IX intrinsic Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase IX intrinsic Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca09)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca12"> 
      <Title>CA XII</Title>
      <Definition>Carbonic anhydrase XII intrinsic Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase XII intrinsic Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca12)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca13"> 
      <Title>CA XIII</Title>
      <Definition>Carbonic anhydrase XIII intrinsic Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase XIII intrinsic Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca13)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca14"> 
      <Title>CA XIV</Title>
      <Definition>Carbonic anhydrase XIV intrinsic Gibbs energy change</Definition>
      <Explanation>Carbonic anhydrase XIV intrinsic Gibbs energy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca14)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <SQLDataType>text</SQLDataType>      
    </Field>
    <Field name="compound_id">
      <Title>Cmpd ID</Title>
      <Definition>Compound ID in main database</Definition>
      <Explanation>Compound ID in main database</Explanation>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        c.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        max(iptu.revision_id)
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM
          (`BVTS`.compound AS c
          JOIN (SELECT 
              dbg_int AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0001' UNION SELECT 
              NULL AS ca01,
                  dbg_int AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0002' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  dbg_int AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0003' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  dbg_int AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0004' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  dbg_int AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0005' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  dbg_int AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0006' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  dbg_int AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0007' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  dbg_int AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0008' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  dbg_int AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0009' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  dbg_int AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0010' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  dbg_int AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0011' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  dbg_int AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipt.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_tsa AS ipt
         JOIN `BVTS`.protein AS p ON p.id = ipt.protein_id
          WHERE
              ipt.public = 1 AND p.primary_group_label = 'PG-0012') 
              AS iptu ON (c.id = iptu.compound_id))
      GROUP BY c.id , iptu.temperature
      ORDER BY c.id
    </Selection>
    <UniqueKey>
      <Field>name</Field>
      <Field>temperature</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(name)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="dbh_int_itc_all_cas" is_view="true" readonly="true">
    <Title>Δ<i>H</i><sub>b,int</sub></Title>
    <Description>The intrinsic binding enthalpy changes (calculated from ITC and protonation data)</Description>
    <Explanation>
      The intrinsic changes in enthalpy upon protein-ligand binding (calculated from ITC and protonation) for 
      all carbonic anhydrase isoforms. Selection of columns performed by 
      <bold>primary group</bold> stated in <bold>protein</bold> table.
    </Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Compound ID</Definition>
      <Explanation>Compound ID</Explanation>
      <Code language="SQL" dialect="MySQL">
        concat_ws('-', c.id, temperature)
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="name">
      <Title>Cmpd name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of compound</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.name
      </Code>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula image file</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.formula_file
      </Code>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="temperature"> 
      <Title><i>T</i></Title>
      <Definition>Temperature</Definition>
      <Explanation>Temperature of the experiment</Explanation>
      <Units>°C</Units>
      <Code language="SQL" dialect="MySQL">
        temperature
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.0f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca01"> 
      <Title>CA I</Title>
      <Definition>Carbonic anhydrase I intrinsic enthalpy change</Definition>
      <Explanation>Carbonic anhydrase I intrinsic enthalpy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca01)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca02"> 
      <Title>CA II</Title>
      <Definition>Carbonic anhydrase II intrinsic enthalpy change</Definition>
      <Explanation>Carbonic anhydrase II intrinsic enthalpy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca02)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca03"> 
      <Title>CA III</Title>
      <Definition>Carbonic anhydrase III intrinsic enthalpy change</Definition>
      <Explanation>Carbonic anhydrase III intrinsic enthalpy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca03)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca04"> 
      <Title>CA IV</Title>
      <Definition>Carbonic anhydrase IV intrinsic enthalpy change</Definition>
      <Explanation>Carbonic anhydrase IV intrinsic enthalpy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca04)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca05a"> 
      <Title>CA VA</Title>
      <Definition>Carbonic anhydrase VA intrinsic enthalpy change</Definition>
      <Explanation>Carbonic anhydrase VA intrinsic enthalpy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca05a)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca05b"> 
      <Title>CA VB</Title>
      <Definition>Carbonic anhydrase VB intrinsic enthalpy change</Definition>
      <Explanation>Carbonic anhydrase VB intrinsic enthalpy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca05b)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca06"> 
      <Title>CA VI</Title>
      <Definition>Carbonic anhydrase VI intrinsic enthalpy change</Definition>
      <Explanation>Carbonic anhydrase VI intrinsic enthalpy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca06)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca07"> 
      <Title>CA VII</Title>
      <Definition>Carbonic anhydrase VII intrinsic enthalpy change</Definition>
      <Explanation>Carbonic anhydrase VII intrinsic enthalpy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca07)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca09"> 
      <Title>CA IX</Title>
      <Definition>Carbonic anhydrase IX intrinsic enthalpy change</Definition>
      <Explanation>Carbonic anhydrase IX intrinsic enthalpy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca09)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca12"> 
      <Title>CA XII</Title>
      <Definition>Carbonic anhydrase XII intrinsic enthalpy change</Definition>
      <Explanation>Carbonic anhydrase XII intrinsic enthalpy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca12)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca13"> 
      <Title>CA XIII</Title>
      <Definition>Carbonic anhydrase XIII intrinsic enthalpy change</Definition>
      <Explanation>Carbonic anhydrase XIII intrinsic enthalpy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca13)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ca14"> 
      <Title>CA XIV</Title>
      <Definition>Carbonic anhydrase XIV intrinsic enthalpy change</Definition>
      <Explanation>Carbonic anhydrase XIV intrinsic enthalpy change</Explanation>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        avg(ca14)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="notes">
      <Title>Notes</Title>
      <Definition>Notes</Definition>
      <SQLDataType>text</SQLDataType>      
    </Field>
    <Field name="compound_id">
      <Title>Cmpd ID</Title>
      <Definition>Compound ID in main database</Definition>
      <Explanation>Compound ID in main database</Explanation>
      <ForeignKey>
        <ReferencedTable>compound</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        c.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Explanation>
        The latest revision ID from source tables or/and views
      </Explanation>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        max(ipiu.revision_id)
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM
          (`BVTS`.compound AS c
          JOIN (SELECT 
              dbh_int AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipi.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_itc AS ipi
         JOIN `BVTS`.protein AS p ON p.id = ipi.protein_id
          WHERE
              ipi.public = 1 AND p.primary_group_label = 'PG-0001' UNION SELECT 
              NULL AS ca01,
                  dbh_int AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipi.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_itc AS ipi
         JOIN `BVTS`.protein AS p ON p.id = ipi.protein_id
          WHERE
              ipi.public = 1 AND p.primary_group_label = 'PG-0002' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  dbh_int AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipi.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_itc AS ipi
         JOIN `BVTS`.protein AS p ON p.id = ipi.protein_id
          WHERE
              ipi.public = 1 AND p.primary_group_label = 'PG-0003' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  dbh_int AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipi.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_itc AS ipi
         JOIN `BVTS`.protein AS p ON p.id = ipi.protein_id
          WHERE
              ipi.public = 1 AND p.primary_group_label = 'PG-0004' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  dbh_int AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipi.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_itc AS ipi
         JOIN `BVTS`.protein AS p ON p.id = ipi.protein_id
          WHERE
              ipi.public = 1 AND p.primary_group_label = 'PG-0005' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  dbh_int AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipi.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_itc AS ipi
         JOIN `BVTS`.protein AS p ON p.id = ipi.protein_id
          WHERE
              ipi.public = 1 AND p.primary_group_label = 'PG-0006' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  dbh_int AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipi.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_itc AS ipi
         JOIN `BVTS`.protein AS p ON p.id = ipi.protein_id
          WHERE
              ipi.public = 1 AND p.primary_group_label = 'PG-0007' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  dbh_int AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipi.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_itc AS ipi
         JOIN `BVTS`.protein AS p ON p.id = ipi.protein_id
          WHERE
              ipi.public = 1 AND p.primary_group_label = 'PG-0008' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  dbh_int AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipi.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_itc AS ipi
         JOIN `BVTS`.protein AS p ON p.id = ipi.protein_id
          WHERE
              ipi.public = 1 AND p.primary_group_label = 'PG-0009' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  dbh_int AS ca12,
                  NULL AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipi.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_itc AS ipi
         JOIN `BVTS`.protein AS p ON p.id = ipi.protein_id
          WHERE
              ipi.public = 1 AND p.primary_group_label = 'PG-0010' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  dbh_int AS ca13,
                  NULL AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipi.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_itc AS ipi
         JOIN `BVTS`.protein AS p ON p.id = ipi.protein_id
          WHERE
              ipi.public = 1 AND p.primary_group_label = 'PG-0011' UNION SELECT 
              NULL AS ca01,
                  NULL AS ca02,
                  NULL AS ca03,
                  NULL AS ca04,
                  NULL AS ca05a,
                  NULL AS ca05b,
                  NULL AS ca06,
                  NULL AS ca07,
                  NULL AS ca09,
                  NULL AS ca12,
                  NULL AS ca13,
                  dbh_int AS ca14,
                  temperature AS temperature,
                  compound_id AS compound_id,
                  ipi.revision_id AS revision_id
          FROM
              `BVTS`.intrinsic_parameters_itc AS ipi
         JOIN `BVTS`.protein AS p ON p.id = ipi.protein_id
          WHERE
              ipi.public = 1 AND p.primary_group_label = 'PG-0012') 
              AS ipiu ON (c.id = ipiu.compound_id))
      GROUP BY c.id , ipiu.temperature
      ORDER BY c.id
    </Selection>
    <UniqueKey>
      <Field>name</Field>
      <Field>temperature</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(name)s</RestfulDB:FKRepresentation>
  </Table>
<!-- Methods compare and statistics -->
  <Table name="all_method_kd_obs_stats_log10" is_view="true">
    <Title>All methods log<sub>10</sub>(<i>K</i><sub>d,obs</sub>) statistics</Title>
    <Description>All method experiments <i>K</i><sub>d,obs</sub> table log<sub>10</sub> statistics</Description>
    <Explanation>Observed binding constant from all available experiments using four instrumental methods.
Experiment statistics represented in log<sub>10</sub> scale.</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Compound ID</Definition>
      <Explanation>Compound ID</Explanation>
      <Code language="SQL" dialect="MySQL">
        concat_ws('-',c.id, experu.label)
      </Code>
      <SQLDataType>varchar (128)</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="compound_id">
      <Title>Compound ID</Title>
      <Definition>Compound ID in main database</Definition>
      <Explanation>Compound ID in main database</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://plbd.org/private/db/BVTS/compound/" primary = "true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Field name="name">
      <Title>Compound name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of compound</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.name
      </Code>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.formula_file
      </Code>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="smiles">
      <Title>SMILES</Title>
      <Definition>SMILES</Definition>
      <Explanation>Simplified molecular-input line-entry system</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.smiles
      </Code>
      <SQLDataType>varchar(512)</SQLDataType>
    </Field>
    <Field name="protein_labels">
      <Title>Protein labels</Title>
      <Definition>Protein labels</Definition>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT p.label ORDER BY p.label SEPARATOR ' ')
      </Code>
    </Field>    
    <Field name="protein_names">
      <Title>Protein names</Title>
      <Definition>Protein names</Definition>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT p.name ORDER BY p.name SEPARATOR ' ')
      </Code>
    </Field>    
    <Field name="protein_group">
      <Title>Protein group</Title>
      <Definition>Protein group name</Definition>
      <Explanation>Protein group for database selection queries </Explanation>
      <Code language="SQL" dialect="MySQL">
        pg.name
      </Code>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="temperatures"> 
      <Title><i>T</i><sub>all</sub></Title>
      <Definition>Temperatures</Definition>
      <Explanation>Temperatures of experiments</Explanation>
      <Units>°C</Units>
      <Code language="SQL" dialect="MySQL">
        GROUP_CONCAT(DISTINCT experu.temperature ORDER BY experu.temperature SEPARATOR ' ')
      </Code>
      <SQLDataType>varchar (128)</SQLDataType>
    </Field>
    <Field name="temperature_avg"> 
      <Title><i>T</i><sub>avg</sub></Title>
      <Definition>Averaged temperature</Definition>
      <Explanation>Averaged temperatures of experiments</Explanation>
      <Units>°C</Units>
      <Code language="SQL" dialect="MySQL">
        AVG(experu.temperature)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ids_tsa" >
      <Title>IDs TSA</Title>
      <Definition>IDs of the TSA experiments</Definition>
      <Explanation>IDs of the TSA experiments from experiment_tsa table</Explanation>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT experu.id_tsa ORDER BY experu.id_tsa SEPARATOR ' ')
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="log10_kd_obs_tsa">
      <Title>log<sub>10</sub>(<i>K</i><sub>d,obs,TSA</sub>)</Title>
      <Definition>Averaged log<sub>10</sub> of observed Kb value from the TSA experiment</Definition>
      <Code language="SQL" dialect="MySQL">
        AVG(LOG10(experu.kd_obs_tsa))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="n_tsa">
      <Title>N<sub>TSA</sub></Title>
      <Definition>Number of the TSA experiments</Definition>
      <Code language="SQL" dialect="MySQL">
        COUNT(DISTINCT experu.id_tsa)
      </Code>
    </Field>
    <Field name="log10_min_kd_obs_tsa">
      <Title>log<sub>10</sub>(min<sub>TSA</sub>)</Title>
      <Definition>Minimal log<sub>10</sub>(<i>K</i><sub>d,obs,TSA</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MIN(LOG10(experu.kd_obs_tsa))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_max_kd_obs_tsa">
      <Title>log<sub>10</sub>(max<sub>TSA)</sub></Title>
      <Definition>Maximal log<sub>10</sub>(<i>K</i><sub>d,obs,TSA</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MAX(LOG10(experu.kd_obs_tsa))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_sig_kd_obs_tsa">
      <Title>log<sub>10</sub>(σ<sub>TSA</sub>)</Title>
      <Definition>Standard deviation of the log<sub>10</sub>(<i>K</i><sub>d,obs,TSA</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        STD(LOG10(experu.kd_obs_tsa))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="cmpd_max_conc_tsa">
      <Title>Cmpd max conc TSA</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Compound max concentration for TSA experiments</Definition>
      <Explanation>Compound maximal (start) concentration for TSA experiments</Explanation>
      <Units>μM</Units>
      <Code language="SQL" dialect="MySQL">
        MAX(experu.cmpd_maxc_tsa)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ids_itc" >
      <Title>IDs ITC</Title>
      <Definition>IDs of the ITC experiments</Definition>
      <Explanation>IDs of the ITC experiments from experiment_itc table</Explanation>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT experu.id_itc ORDER BY experu.id_itc SEPARATOR ' ')
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="log10_kd_obs_itc">
      <Title>log<sub>10</sub>(<i>K</i><sub>d,obs,ITC</sub>)</Title>
      <Definition>Averaged log<sub>10</sub> of observed Kb value from the ITC experiment</Definition>
      <Code language="SQL" dialect="MySQL">
        AVG(LOG10(experu.kd_obs_itc))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="n_itc">
      <Title>N<sub>ITC</sub></Title>
      <Definition>Number of the ITC experiments</Definition>
      <Code language="SQL" dialect="MySQL">
        COUNT(DISTINCT experu.id_itc)
      </Code>
    </Field>
    <Field name="log10_min_kd_obs_itc">
      <Title>log<sub>10</sub>(min<sub>ITC</sub>)</Title>
      <Definition>Minimal log<sub>10</sub>(<i>K</i><sub>d,obs,ITC</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MIN(LOG10(experu.kd_obs_itc))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_max_kd_obs_itc">
      <Title>log<sub>10</sub>(max<sub>ITC</sub>)</Title>
      <Definition>Maximal log<sub>10</sub>(<i>K</i><sub>d,obs,ITC</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MAX(LOG10(experu.kd_obs_itc))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_sig_kd_obs_itc">
      <Title>log<sub>10</sub>(σ<sub>ITC</sub>)</Title>
      <Definition>Standard deviation of the log<sub>10</sub>(<i>K</i><sub>d,obs,ITC</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        STD(LOG10(experu.kd_obs_itc))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ids_sfa" >
      <Title>IDs SFA</Title>
      <Definition>IDs of the SFA experiment</Definition>
      <Explanation>IDs of the SFA experiment from experiment_sfa table</Explanation>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT experu.id_sfa ORDER BY experu.id_spr SEPARATOR ' ')
      </Code>
      <SQLDataType>text</SQLDataType>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://plbd.org/private/db/BVTS/experiment_sfa/" primary = "true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Field name="log10_ic50_sfa">
      <Title>log<sub>10</sub>(IC50<sub>obs,SFA</sub>)</Title>
      <Definition>Averaged log<sub>10</sub> of observed IC50 value from the SFA experiment</Definition>
      <Code language="SQL" dialect="MySQL">
        AVG(LOG10(experu.ic50))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="n_sfa">
      <Title>N<sub>SFA</sub></Title>
      <Definition>Number of the SFA experiments</Definition>
      <Code language="SQL" dialect="MySQL">
        COUNT(DISTINCT experu.id_sfa)
      </Code>
    </Field>
    <Field name="log10_min_ic50_sfa">
      <Title>log<sub>10</sub>(min<sub>SFA</sub>)</Title>
      <Definition>Minimal log<sub>10</sub>(<i>K</i><sub>d,obs,SFA</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MIN(LOG10(experu.ic50))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_max_ic50_sfa">
      <Title>log<sub>10</sub>(max<sub>SFA</sub>)</Title>
      <Definition>Maximal log<sub>10</sub>(<i>K</i><sub>d,obs,SFA</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MAX(LOG10(experu.ic50))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_sig_ic50_sfa">
      <Title>log<sub>10</sub>(σ<sub>SFA</sub>)</Title>
      <Definition>Standard deviation of the log<sub>10</sub>(<i>K</i><sub>d,obs,SFA</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        STD(LOG10(experu.ic50))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="cmpd_max_conc_sfa">
      <Title>Cmpd max conc SFA</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Compound max concentration for SFA experiments</Definition>
      <Explanation>Compound maximal (start) concentration for SFA experiments</Explanation>
      <Units>μM</Units>
      <Code language="SQL" dialect="MySQL">
        MAX(experu.cmpd_maxc_sfa)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ids_spr" >
      <Title>IDs SPR</Title>
      <Definition>IDs of the SPR experiments</Definition>
      <Explanation>IDs of the SPR experiments from experiment_spr table</Explanation>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT experu.id_spr ORDER BY experu.id_spr SEPARATOR ' ')
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="log10_k_ed_obs_spr">
      <Title>log<sub>10</sub>(<i>K</i><sub>ed,obs,SPR</sub>)</Title>
      <Definition>Averaged log<sub>10</sub> of observed <i>K</i><sub>ed</sub> value from the SPR experiment</Definition>
      <Code language="SQL" dialect="MySQL">
        AVG(LOG10(experu.k_ed_obs))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="n_spr">
      <Title>N<sub>SPR</sub></Title>
      <Definition>Number of the SPR experiments</Definition>
      <Code language="SQL" dialect="MySQL">
        COUNT(DISTINCT experu.id_spr)
      </Code>
    </Field>
    <Field name="log10_min_k_ed_obs_spr">
      <Title>log<sub>10</sub>(min<sub>SPR</sub>)</Title>
      <Definition>Minimal log<sub>10</sub>(<i>K</i><sub>ed,obs,SPR</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MIN(LOG10(experu.k_ed_obs))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_max_k_ed_obs_spr">
      <Title>log<sub>10</sub>(max<sub>SPR</sub>)</Title>
      <Definition>Maximal log<sub>10</sub>(<i>K</i><sub>ed,obs,SPR</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MAX(LOG10(experu.k_ed_obs))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_sig_k_ed_obs_spr">
      <Title>log<sub>10</sub>(σ<sub>SPR</sub>)</Title>
      <Definition>Standard deviation of the log<sub>10</sub>(<i>K</i><sub>ed,obs,SPR</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        STD(LOG10(experu.k_ed_obs))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="cmpd_max_conc_spr">
      <Title>Cmpd max conc SPR</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Compound max concentration for SPR experiments</Definition>
      <Explanation>Compound maximal (start) concentration for SPR experiments</Explanation>
      <Units>μM</Units>
      <Code language="SQL" dialect="MySQL">
        MAX(experu.cmpd_maxc_spr)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="revision_id">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Code language="SQL" dialect="MySQL">
        MAX(experu.revision_id)
      </Code>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://plbd.org/private/db/BVTS/revision/" primary = "true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Selection language="SQL">
      FROM
          (SELECT 
              exper.label AS label,
                  exper.id AS id_tsa,
                  1 / exper.kb_obs AS kd_obs_tsa,
                  exper.compound_max_concentration AS cmpd_maxc_tsa,
                  NULL AS id_itc,
                  NULL AS kd_obs_itc,
                  NULL AS id_sfa,
                  NULL AS ic50,
                  NULL AS cmpd_maxc_sfa,
                  NULL AS id_spr,
                  NULL AS k_ed_obs,
                  NULL AS cmpd_maxc_spr,
                  exper.temperature AS temperature,
                  exper.compound_id AS compound_id,
                  exper.protein_label AS protein_label,
                  exper.primary_group_label AS primary_group_label,
                  exper.public AS public,
                  exper.revision_id AS revision_id
          FROM
              `BVTS`.experiment_tsa_protein_compound_view AS exper
          WHERE
              `exper`.`public` = 1 UNION SELECT 
              exper.label AS label,
                  NULL AS id_tsa,
                  NULL AS kd_obs_tsa,
                  NULL AS cmpd_maxc_tsa,
                  exper.id AS id_itc,
                  1 / exper.kb_obs AS kd_obs_itc,
                  NULL AS id_sfa,
                  NULL AS ic50,
                  NULL AS cmpd_maxc_sfa,
                  NULL AS id_spr,
                  NULL AS k_ed_obs,
                  NULL AS cmpd_maxc_spr,
                  exper.temperature AS temperature,
                  exper.compound_id AS compound_id,
                  exper.protein_label AS protein_label,
                  exper.primary_group_label AS primary_group_label,
                  exper.public AS public,
                  exper.revision_id AS revision_id
          FROM
              `BVTS`.experiment_itc_protein_compound_view AS exper
          WHERE
              `exper`.`public` = 1 UNION SELECT 
              exper.label AS label,
                  NULL AS id_tsa,
                  NULL AS kd_obs_tsa,
                  NULL AS cmpd_maxc_tsa,
                  NULL AS id_itc,
                  NULL AS kd_obs_itc,
                  exper.id AS id_sfa,
                  exper.ic50 / 1000000000 AS ic50,
                  exper.compound_max_concentration AS cmpd_maxc_sfa,
                  NULL AS id_spr,
                  NULL AS k_ed_obs,
                  NULL AS cmpd_maxc_spr,
                  exper.temperature AS temperature,
                  exper.compound_id AS compound_id,
                  exper.protein_label AS protein_label,
                  exper.primary_group_label AS primary_group_label,
                  exper.public AS public,
                  exper.revision_id AS revision_id
          FROM
              `BVTS`.experiment_sfa_protein_compound_view AS exper
          WHERE
              `exper`.`public` = 1 UNION SELECT 
              exper.label AS label,
                  NULL AS id_tsa,
                  NULL AS kd_obs_tsa,
                  NULL AS cmpd_maxc_tsa,
                  NULL AS id_itc,
                  NULL AS kd_obs_itc,
                  NULL AS id_sfa,
                  NULL AS ic50,
                  NULL AS cmpd_maxc_sfa,
                  exper.id AS id_spr,
                  exper.k_ed_obs AS k_ed_obs,
                  exper.compound_max_concentration AS cmpd_maxc_spr,
                  exper.temperature AS temperature,
                  exper.compound_id AS compound_id,
                  exper.protein_label AS protein_label,
                  exper.primary_group_label AS primary_group_label,
                  exper.public AS public,
                  exper.revision_id AS revision_id
          FROM
              `BVTS`.experiment_spr_protein_compound_view AS exper
          WHERE
              `exper`.`public` = 1) AS experu
              JOIN
          `BVTS`.compound AS c ON (c.id = experu.compound_id)
              LEFT JOIN
          `BVTS`.protein_group AS pg ON (pg.label = experu.primary_group_label)
              JOIN
          `BVTS`.protein AS p ON (p.label = experu.protein_label)
      GROUP BY compound_id , protein_group
      ORDER BY compound_id , protein_group
    </Selection>
    <UniqueKey>
      <Field>name</Field>
      <Field>temperature</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(name)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="all_method_kd_int_stats_log10" is_view="true">
    <Title>All methods log<sub>10</sub>(<i>K</i><sub>d,int</sub>) statistics</Title>
    <Description>All method experiments <i>K</i><sub>d,int</sub> table log<sub>10</sub> statistics</Description>
    <Explanation>Intrinsic binding constant from all available experiments using four instrumental methods.
Experiment statistics represented in log<sub>10</sub> scale.</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Compound ID</Definition>
      <Explanation>Compound ID</Explanation>
      <Code language="SQL" dialect="MySQL">
        concat_ws('-',c.id, experu.label)
      </Code>
      <SQLDataType>varchar (128)</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="compound_id">
      <Title>Compound ID</Title>
      <Definition>Compound ID in main database</Definition>
      <Explanation>Compound ID in main database</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://plbd.org/private/db/BVTS/compound/" primary = "true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Field name="name">
      <Title>Compound name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of compound</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.name
      </Code>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.formula_file
      </Code>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="smiles">
      <Title>SMILES</Title>
      <Definition>SMILES</Definition>
      <Explanation>Simplified molecular-input line-entry system</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.smiles
      </Code>
      <SQLDataType>varchar(512)</SQLDataType>
    </Field>
    <Field name="protein_labels">
      <Title>Protein labels</Title>
      <Definition>Protein labels</Definition>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT p.label ORDER BY p.label SEPARATOR ' ')
      </Code>
    </Field>    
    <Field name="protein_names">
      <Title>Protein names</Title>
      <Definition>Protein names</Definition>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT p.name ORDER BY p.name SEPARATOR ' ')
      </Code>
    </Field>    
    <Field name="protein_group">
      <Title>Protein group</Title>
      <Definition>Protein group name</Definition>
      <Explanation>Protein group for database selection queries </Explanation>
      <Code language="SQL" dialect="MySQL">
        pg.name
      </Code>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="temperatures"> 
      <Title><i>T</i><sub>all</sub></Title>
      <Definition>Temperatures</Definition>
      <Explanation>Temperatures of experiments</Explanation>
      <Units>°C</Units>
      <Code language="SQL" dialect="MySQL">
        GROUP_CONCAT(DISTINCT experu.temperature ORDER BY experu.temperature SEPARATOR ' ')
      </Code>
      <SQLDataType>varchar (128)</SQLDataType>
    </Field>
    <Field name="temperature_avg"> 
      <Title><i>T</i><sub>avg</sub></Title>
      <Definition>Averaged temperature</Definition>
      <Explanation>Averaged temperatures of experiments</Explanation>
      <Units>°C</Units>
      <Code language="SQL" dialect="MySQL">
        AVG(experu.temperature)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ids_tsa" >
      <Title>IDs TSA</Title>
      <Definition>IDs of the TSA experiments</Definition>
      <Explanation>IDs of the TSA experiments from experiment_tsa table</Explanation>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT experu.id_tsa ORDER BY experu.id_tsa SEPARATOR ' ')
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="log10_kd_int_tsa">
      <Title>log<sub>10</sub>(<i>K</i><sub>d,int,TSA</sub>)</Title>
      <Definition>Averaged log<sub>10</sub> of intrinsic Kd value from the TSA experiment</Definition>
      <Code language="SQL" dialect="MySQL">
        AVG(LOG10(1 / (experu.kb_obs_tsa * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="n_tsa">
      <Title>N<sub>TSA</sub></Title>
      <Definition>Number of the TSA experiments</Definition>
      <Code language="SQL" dialect="MySQL">
        COUNT(DISTINCT experu.id_tsa)
      </Code>
    </Field>
    <Field name="log10_min_kd_int_tsa">
      <Title>log<sub>10</sub>(min<sub>TSA</sub>)</Title>
      <Definition>Minimal log<sub>10</sub>(<i>K</i><sub>d,int,TSA</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MIN(LOG10(1 / (experu.kb_obs_tsa * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_max_kd_int_tsa">
      <Title>log<sub>10</sub>(max<sub>TSA)</sub></Title>
      <Definition>Maximal log<sub>10</sub>(<i>K</i><sub>d,int,TSA</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MAX(LOG10(1 / (experu.kb_obs_tsa * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_sig_kd_int_tsa">
      <Title>log<sub>10</sub>(σ<sub>TSA</sub>)</Title>
      <Definition>Standard deviation of the log<sub>10</sub>(<i>K</i><sub>d,int,TSA</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        STD(LOG10(1 / (experu.kb_obs_tsa * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="cmpd_max_conc_tsa">
      <Title>Cmpd max conc TSA</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Compound max concentration for TSA experiments</Definition>
      <Explanation>Compound maximal (start) concentration for TSA experiments</Explanation>
      <Units>μM</Units>
      <Code language="SQL" dialect="MySQL">
        MAX(experu.cmpd_maxc_tsa)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ids_itc" >
      <Title>IDs ITC</Title>
      <Definition>IDs of the ITC experiments</Definition>
      <Explanation>IDs of the ITC experiments from experiment_itc table</Explanation>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT experu.id_itc ORDER BY experu.id_itc SEPARATOR ' ')
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="log10_kd_int_itc">
      <Title>log<sub>10</sub>(<i>K</i><sub>d,int,ITC</sub>)</Title>
      <Definition>Averaged log<sub>10</sub> of intrinsic Kd value from the ITC experiment</Definition>
      <Code language="SQL" dialect="MySQL">
        AVG(LOG10(1 / (experu.kb_obs_itc * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="n_itc">
      <Title>N<sub>ITC</sub></Title>
      <Definition>Number of the ITC experiments</Definition>
      <Code language="SQL" dialect="MySQL">
        COUNT(DISTINCT experu.id_itc)
      </Code>
    </Field>
    <Field name="log10_min_kd_int_itc">
      <Title>log<sub>10</sub>(min<sub>ITC</sub>)</Title>
      <Definition>Minimal log<sub>10</sub>(<i>K</i><sub>d,int,ITC</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MIN(LOG10(1 / (experu.kb_obs_itc * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_max_kd_int_itc">
      <Title>log<sub>10</sub>(max<sub>ITC</sub>)</Title>
      <Definition>Maximal log<sub>10</sub>(<i>K</i><sub>d,int,ITC</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MAX(LOG10(1 / (experu.kb_obs_itc * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_sig_kd_int_itc">
      <Title>log<sub>10</sub>(σ<sub>ITC</sub>)</Title>
      <Definition>Standard deviation of the log<sub>10</sub>(<i>K</i><sub>d,int,ITC</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        STD(LOG10(1 / (experu.kb_obs_itc * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ids_sfa" >
      <Title>IDs SFA</Title>
      <Definition>IDs of the SFA experiment</Definition>
      <Explanation>IDs of the SFA experiment from experiment_sfa table</Explanation>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT experu.id_sfa ORDER BY experu.id_spr SEPARATOR ' ')
      </Code>
      <SQLDataType>text</SQLDataType>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://plbd.org/private/db/BVTS/experiment_sfa/" primary = "true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Field name="log10_kd_int_sfa">
      <Title>log<sub>10</sub>(<i>K</i><sub>d,int,SFA</sub>)</Title>
      <Definition>Averaged log<sub>10</sub> of intrinsic Kd value from the SFA experiment</Definition>
      <Code language="SQL" dialect="MySQL">
        AVG(LOG10(1 / (experu.kb_obs_sfa * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="n_sfa">
      <Title>N<sub>SFA</sub></Title>
      <Definition>Number of the SFA experiments</Definition>
      <Code language="SQL" dialect="MySQL">
        COUNT(DISTINCT experu.id_sfa)
      </Code>
    </Field>
    <Field name="log10_min_kd_int_sfa">
      <Title>log<sub>10</sub>(min<sub>SFA</sub>)</Title>
      <Definition>Minimal log<sub>10</sub>(<i>K</i><sub>d,int,SFA</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MIN(LOG10(1 / (experu.kb_obs_sfa * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_max_kd_int_sfa">
      <Title>log<sub>10</sub>(max<sub>SFA</sub>)</Title>
      <Definition>Maximal log<sub>10</sub>(<i>K</i><sub>d,int,SFA</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MAX(LOG10(1 / (experu.kb_obs_sfa * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_sig_kd_int_sfa">
      <Title>log<sub>10</sub>(σ<sub>SFA</sub>)</Title>
      <Definition>Standard deviation of the log<sub>10</sub>(<i>K</i><sub>d,int,SFA</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        STD(LOG10(1 / (experu.kb_obs_sfa * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="cmpd_max_conc_sfa">
      <Title>Cmpd max conc SFA</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Compound max concentration for SFA experiments</Definition>
      <Explanation>Compound maximal (start) concentration for SFA experiments</Explanation>
      <Units>μM</Units>
      <Code language="SQL" dialect="MySQL">
        MAX(experu.cmpd_maxc_sfa)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ids_spr" >
      <Title>IDs SPR</Title>
      <Definition>IDs of the SPR experiments</Definition>
      <Explanation>IDs of the SPR experiments from experiment_spr table</Explanation>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT experu.id_spr ORDER BY experu.id_spr SEPARATOR ' ')
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="log10_kd_int_spr">
      <Title>log<sub>10</sub>(<i>K</i><sub>d,int,SPR</sub>)</Title>
      <Definition>Averaged log<sub>10</sub> of intrinsic <i>K</i><sub>d</sub> value from the SPR experiment</Definition>
      <Code language="SQL" dialect="MySQL">
        AVG(LOG10(1 / (experu.kb_obs_spr * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="n_spr">
      <Title>N<sub>SPR</sub></Title>
      <Definition>Number of the SPR experiments</Definition>
      <Code language="SQL" dialect="MySQL">
        COUNT(DISTINCT experu.id_spr)
      </Code>
    </Field>
    <Field name="log10_min_kd_int_spr">
      <Title>log<sub>10</sub>(min<sub>SPR</sub>)</Title>
      <Definition>Minimal log<sub>10</sub>(<i>K</i><sub>d,int,SPR</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MIN(LOG10(1 / (experu.kb_obs_spr * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_max_kd_int_spr">
      <Title>log<sub>10</sub>(max<sub>SPR</sub>)</Title>
      <Definition>Maximal log<sub>10</sub>(<i>K</i><sub>d,int,SPR</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        MAX(LOG10(1 / (experu.kb_obs_spr * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="log10_sig_kd_int_spr">
      <Title>log<sub>10</sub>(σ<sub>SPR</sub>)</Title>
      <Definition>Standard deviation of the log<sub>10</sub>(<i>K</i><sub>d,int,SPR</sub>) value</Definition>
      <Code language="SQL" dialect="MySQL">
        STD(LOG10(1 / (experu.kb_obs_spr * 
            (1 + power(10, protcpka.pka - experu.ph)) *
            (1 + power(10, experu.ph - protppka.pka_zn)))
            ))
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.2f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="cmpd_max_conc_spr">
      <Title>Cmpd max conc SPR</Title>
      <DataOrigin>measurement</DataOrigin>
      <Definition>Compound max concentration for SPR experiments</Definition>
      <Explanation>Compound maximal (start) concentration for SPR experiments</Explanation>
      <Units>μM</Units>
      <Code language="SQL" dialect="MySQL">
        MAX(experu.cmpd_maxc_spr)
      </Code>
      <SQLDataType>float</SQLDataType>
      <RestfulDB:DisplayFormat language="printf">
        %6d
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="revision_id">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Code language="SQL" dialect="MySQL">
        MAX(experu.revision_id)
      </Code>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://plbd.org/private/db/BVTS/revision/" primary = "true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Selection language="SQL">
      FROM
          (((((((SELECT 
              `exper`.`label` AS `label`,
                  `exper`.`id` AS `id_tsa`,
                  `exper`.`kb_obs` AS `kb_obs_tsa`,
                  `exper`.`compound_max_concentration` AS `cmpd_maxc_tsa`,
                  NULL AS `id_itc`,
                  NULL AS `kb_obs_itc`,
                  NULL AS `id_sfa`,
                  NULL AS `kb_obs_sfa`,
                  NULL AS `cmpd_maxc_sfa`,
                  NULL AS `id_spr`,
                  NULL AS `kb_obs_spr`,
                  NULL AS `cmpd_maxc_spr`,
                  `exper`.`temperature` AS `temperature`,
                  `exper`.`ph` AS `ph`,
                  `exper`.`compound_id` AS `compound_id`,
                  `exper`.`protein_label` AS `protein_label`,
                  `exper`.`primary_group_label` AS `primary_group_label`,
                  `exper`.`public` AS `public`,
                  `exper`.`revision_id` AS `revision_id`
          FROM
              `BVTS`.`experiment_tsa_protein_compound_view` `exper`
          WHERE
              `exper`.`public` = 1) UNION SELECT 
              `exper`.`label` AS `label`,
                  NULL AS `id_tsa`,
                  NULL AS `kb_obs_tsa`,
                  NULL AS `cmpd_maxc_tsa`,
                  `exper`.`id` AS `id_itc`,
                  `exper`.`kb_obs` AS `kb_obs_itc`,
                  NULL AS `id_sfa`,
                  NULL AS `kb_obs_sfa`,
                  NULL AS `cmpd_maxc_sfa`,
                  NULL AS `id_spr`,
                  NULL AS `kb_obs_spr`,
                  NULL AS `cmpd_maxc_spr`,
                  `exper`.`temperature` AS `temperature`,
                  `exper`.`ph` AS `ph`,
                  `exper`.`compound_id` AS `compound_id`,
                  `exper`.`protein_label` AS `protein_label`,
                  `exper`.`primary_group_label` AS `primary_group_label`,
                  `exper`.`public` AS `public`,
                  `exper`.`revision_id` AS `revision_id`
          FROM
              `BVTS`.`experiment_itc_protein_compound_view` `exper`
          WHERE
              `exper`.`public` = 1 UNION SELECT 
              `exper`.`label` AS `label`,
                  NULL AS `id_tsa`,
                  NULL AS `kb_obs_tsa`,
                  NULL AS `cmpd_maxc_tsa`,
                  NULL AS `id_itc`,
                  NULL AS `kb_obs_itc`,
                  `exper`.`id` AS `id_sfa`,
                  1 / (`exper`.`ic50` / 1000000000) AS `kb_obs_sfa`,
                  `exper`.`compound_max_concentration` AS `cmpd_maxc_sfa`,
                  NULL AS `id_spr`,
                  NULL AS `kb_obs_spr`,
                  NULL AS `cmpd_maxc_spr`,
                  `exper`.`temperature` AS `temperature`,
                  `exper`.`ph` AS `ph`,
                  `exper`.`compound_id` AS `compound_id`,
                  `exper`.`protein_label` AS `protein_label`,
                  `exper`.`primary_group_label` AS `primary_group_label`,
                  `exper`.`public` AS `public`,
                  `exper`.`revision_id` AS `revision_id`
          FROM
              `BVTS`.`experiment_sfa_protein_compound_view` `exper`
          WHERE
              `exper`.`public` = 1 UNION SELECT 
              `exper`.`label` AS `label`,
                  NULL AS `id_tsa`,
                  NULL AS `kb_obs_tsa`,
                  NULL AS `cmpd_maxc_tsa`,
                  NULL AS `id_itc`,
                  NULL AS `kb_obs_itc`,
                  NULL AS `id_sfa`,
                  NULL AS `kb_obs_sfa`,
                  NULL AS `cmpd_maxc_sfa`,
                  `exper`.`id` AS `id_spr`,
                  1 / `exper`.`k_ed_obs` AS `kb_obs_spr`,
                  `exper`.`compound_max_concentration` AS `cmpd_maxc_spr`,
                  `exper`.`temperature` AS `temperature`,
                  `exper`.`ph` AS `ph`,
                  `exper`.`compound_id` AS `compound_id`,
                  `exper`.`protein_label` AS `protein_label`,
                  `exper`.`primary_group_label` AS `primary_group_label`,
                  `exper`.`public` AS `public`,
                  `exper`.`revision_id` AS `revision_id`
          FROM
              `BVTS`.`experiment_spr_protein_compound_view` `exper`
          WHERE
              `exper`.`public` = 1) `experu`
          JOIN `BVTS`.`compound` `c` ON (`c`.`id` = `experu`.`compound_id`))
          LEFT JOIN `BVTS`.`protein_group` `pg` ON (`pg`.`label` = `experu`.`primary_group_label`))
          JOIN `BVTS`.`protein` `p` ON (`p`.`label` = `experu`.`protein_label`))
          JOIN `BVTS`.`best_compound_protonation_pka` `protcpka` ON ((`experu`.`compound_id` = `protcpka`.`compound_id`)
              AND ABS(`experu`.`temperature` - `protcpka`.`temperature`)  &lt; 3)
          JOIN `BVTS`.`best_protein_protonation_pka` `protppka` ON ((`experu`.`protein_label` = `protppka`.`protein_label`)
              AND ABS(`experu`.`temperature` - `protppka`.`temperature`)  &lt; 3)))
      GROUP BY `c`.`id` , `pg`.`name`
      ORDER BY `c`.`id` , `pg`.`name`
    </Selection>
    <UniqueKey>
      <Field>name</Field>
      <Field>temperature</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(name)s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="enthalpy_int_stats" is_view="true">
    <Title>Intrinsic enthalpy statistics</Title>
    <Description>Intrinsic Gibbs energy and enthalpy statistics</Description>
    <Explanation>Intrinsic enthalpy and Gibbs energy statistics fromm ITC experiments with additional 
Gibbs energy from TSA experiments. Used for enthalpy-entropy compensation plot.</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Compound ID</Definition>
      <Explanation>Compound ID</Explanation>
      <Code language="SQL" dialect="MySQL">
        concat_ws('-',c.id, experu.label)
      </Code>
      <SQLDataType>varchar (128)</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="compound_id">
      <Title>Compound ID</Title>
      <Definition>Compound ID in main database</Definition>
      <Explanation>Compound ID in main database</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.id
      </Code>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://plbd.org/private/db/BVTS/compound/" primary = "true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Field name="name">
      <Title>Compound name</Title>
      <Definition>Name of compound</Definition>
      <Explanation>Name of compound</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.name
      </Code>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Field name="formula_file">
      <Title>Structure</Title>
      <Definition>Structural formula</Definition>
      <Explanation>Structural formula</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.formula_file
      </Code>
      <SQLDataType>blob</SQLDataType>
      <RestfulDB:Role>image</RestfulDB:Role>
    </Field>
    <Field name="smiles">
      <Title>SMILES</Title>
      <Definition>SMILES</Definition>
      <Explanation>Simplified molecular-input line-entry system</Explanation>
      <Code language="SQL" dialect="MySQL">
        c.smiles
      </Code>
      <SQLDataType>varchar(512)</SQLDataType>
    </Field>
    <Field name="protein_labels">
      <Title>Protein labels</Title>
      <Definition>Protein labels</Definition>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT p.label ORDER BY p.label SEPARATOR ' ')
      </Code>
    </Field>    
    <Field name="protein_names">
      <Title>Protein names</Title>
      <Definition>Protein names</Definition>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT p.name ORDER BY p.name SEPARATOR ' ')
      </Code>
    </Field>    
    <Field name="protein_group">
      <Title>Protein group</Title>
      <Definition>Protein group name</Definition>
      <Explanation>Protein group for database selection queries </Explanation>
      <Code language="SQL" dialect="MySQL">
        pg.name
      </Code>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="temperature"> 
      <Title><i>T</i></Title>
      <Definition>Temperature</Definition>
      <Explanation>Temperature of experiments</Explanation>
      <Units>°C</Units>
      <Code language="SQL" dialect="MySQL">
        GROUP_CONCAT(DISTINCT experu.temperature ORDER BY experu.temperature SEPARATOR ' ')
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %4.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ids_tsa" >
      <Title>IDs TSA</Title>
      <Definition>IDs of the TSA experiments</Definition>
      <Explanation>IDs of the TSA experiments from experiment_tsa table</Explanation>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT experu.id_tsa ORDER BY experu.id_tsa SEPARATOR ' ')
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="n_tsa">
      <Title>N<sub>TSA</sub></Title>
      <Definition>Number of the TSA experiments</Definition>
      <Code language="SQL" dialect="MySQL">
        COUNT(DISTINCT experu.id_tsa)
      </Code>
    </Field>
    <Field name="dbg_int_tsa">
      <Title>Δ<i>G</i><sub>int,TSA</sub></Title>
      <Definition>Intrinsic ΔGb value from TSA experiments</Definition>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        AVG(experu.dbg_int_tsa)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="min_dbg_int_tsa">
      <Title>min<sub>Δ<i>G</i><sub>int,TSA</sub></sub></Title>
      <Definition>Minimal intrinsic ΔGb value from TSA experiments</Definition>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        MIN(experu.dbg_int_tsa)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="max_dbg_int_tsa">
      <Title>max<sub>Δ<i>G</i><sub>int,TSA</sub></sub></Title>
      <Definition>Maximal intrinsic ΔGb value from TSA experiments</Definition>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        MAX(experu.dbg_int_tsa)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="sig_dbg_int_tsa">
      <Title>σ<sub>Δ<i>G</i><sub>int,TSA</sub></sub></Title>
      <Definition>Standard deviation of intrinsic ΔGb value from TSA experiments</Definition>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        STD(experu.dbg_int_tsa)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="ids_itc" >
      <Title>IDs ITC</Title>
      <Definition>IDs of the ITC experiments</Definition>
      <Explanation>IDs of the ITC experiments from experiment_itc table</Explanation>
      <Code language="SQL" dialect="MySQL">
        group_concat(DISTINCT experu.id_itc ORDER BY experu.id_itc SEPARATOR ' ')
      </Code>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Field name="n_itc">
      <Title>N<sub>ITC</sub></Title>
      <Definition>Number of the ITC experiments</Definition>
      <Code language="SQL" dialect="MySQL">
        COUNT(DISTINCT experu.id_itc)
      </Code>
    </Field>
    <Field name="dbg_int_itc">
      <Title>Δ<i>G</i><sub>int,ITC</sub></Title>
      <Definition>Intrinsic ΔGb value from ITC experiments</Definition>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        AVG(experu.dbg_int_itc)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="min_dbg_int_itc">
      <Title>min<sub>Δ<i>G</i><sub>int,ITC</sub></sub></Title>
      <Definition>Minimal intrinsic ΔGb value from ITC experiments</Definition>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        MIN(experu.dbg_int_itc)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="max_dbg_int_itc">
      <Title>max<sub>Δ<i>G</i><sub>int,ITC</sub></sub></Title>
      <Definition>Maximal intrinsic ΔGb value from ITC experiments</Definition>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        MAX(experu.dbg_int_itc)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="sig_dbg_int_itc">
      <Title>σ<sub>Δ<i>G</i><sub>int,ITC</sub></sub></Title>
      <Definition>Standard deviation of intrinsic ΔGb value from ITC experiments</Definition>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        STD(experu.dbg_int_itc)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="dbh_int_itc">
      <Title>Δ<i>H</i><sub>int,ITC</sub></Title>
      <Definition>Intrinsic ΔHb value from ITC experiments</Definition>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        AVG(experu.dbh_int_itc)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="min_dbh_int_itc">
      <Title>min<sub>Δ<i>H</i><sub>int,ITC</sub></sub></Title>
      <Definition>Minimal intrinsic ΔHb value from ITC experiments</Definition>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        MIN(experu.dbh_int_itc)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="max_dbh_int_itc">
      <Title>max<sub>Δ<i>H</i><sub>int,ITC</sub></sub></Title>
      <Definition>Maximal intrinsic ΔHb value from ITC experiments</Definition>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        MAX(experu.dbh_int_itc)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="sig_dbh_int_itc">
      <Title>σ<sub>Δ<i>H</i><sub>int,ITC</sub></sub></Title>
      <Definition>Standard deviation of intrinsic ΔHb value from ITC experiments</Definition>
      <Units>kJ/mol</Units>
      <Code language="SQL" dialect="MySQL">
        STD(experu.dbh_int_itc)
      </Code>
      <RestfulDB:DisplayFormat language="printf">
        %3.1f
      </RestfulDB:DisplayFormat>
    </Field>
    <Field name="revision_id">
      <Title>DB Revision</Title>
      <Definition>
        Database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <Code language="SQL" dialect="MySQL">
        MAX(GREATEST(`experu`.`revision_id`, `c`.`revision_id`, `p`.`revision_id`, `pg`.`revision_id`))
      </Code>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://plbd.org/private/db/BVTS/revision/" primary = "true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Selection language="SQL">
      FROM
          (SELECT   
            `eitc`.`label` AS `label`,
            `etsa`.`id` AS `id_tsa`,
            - 8.31446 * (`etsa`.`temperature` + 273.15) 
                * LN(`etsa`.`kb_obs` * (1 + POW(10, `protcpka`.`pka` - `etsa`.`ph`)) 
                * (1 + POW(10, `etsa`.`ph` - `protppka`.`pka_zn`))) / 1000 AS `dbg_int_tsa`,
            `eitc`.`id` AS `id_itc`,
            - 8.31446 * (`eitc`.`temperature` + 273.15) 
                * LN(`eitc`.`kb_obs` * (1 + POW(10, `protcpka`.`pka` - `eitc`.`ph`)) 
                * (1 + POW(10, `eitc`.`ph` - `protppka`.`pka_zn`))) / 1000 AS `dbg_int_itc`,
            `eitc`.`dbh_obs` + (`protcdah`.`dah` - `protbuff`.`dah`) 
                / (1 + POW(10, `eitc`.`ph` - `protcpka`.`pka`)) - (`protpdah`.`dah_zn` - `protbuff`.`dah`) 
                / (1 + POW(10, `protppka`.`pka_zn` - `eitc`.`ph`)) AS `dbh_int_itc`,
            `eitc`.`temperature` AS `temperature`,
            `eitc`.`ph` AS `ph`,
            `eitc`.`compound_id` AS `compound_id`,
            `eitc`.`protein_label` AS `protein_label`,
            `eitc`.`primary_group_label` AS `primary_group_label`,
            (`eitc`.`public`) AND (`etsa`.`public`) AS `public`,
            GREATEST(`eitc`.`revision_id`, `etsa`.`revision_id`, 
                      `protcpka`.`revision_id`, `protppka`.`revision_id`, 
                      `protcdah`.`revision_id`, `protpdah`.`revision_id`, 
                      `protbuff`.`revision_id`) AS `revision_id`
          FROM 
              `BVTS`.`experiment_itc_protein_compound_view` `eitc`
          JOIN `BVTS`.`best_compound_protonation_pka` `protcpka` 
              ON (`eitc`.`compound_id` = `protcpka`.`compound_id`)
              AND (ABS(`eitc`.`temperature` - `protcpka`.`temperature`) &lt; 3)
          JOIN `BVTS`.`best_protein_protonation_pka` `protppka` 
              ON (`eitc`.`protein_label` = `protppka`.`protein_label`)
              AND (ABS(`eitc`.`temperature` - `protppka`.`temperature`) &lt; 3)
          JOIN `BVTS`.`best_compound_protonation_dah` `protcdah` 
              ON (`eitc`.`compound_id` = `protcdah`.`compound_id`)
              AND (ABS(`eitc`.`temperature` - `protcdah`.`temperature`) &lt; 3)
          JOIN `BVTS`.`best_protein_protonation_dah` `protpdah` 
              ON (`eitc`.`protein_label` = `protpdah`.`protein_label`)
              AND (ABS(`eitc`.`temperature` - `protpdah`.`temperature`) &lt; 3)
          JOIN `BVTS`.`best_buffer_protonation` `protbuff` 
              ON (`eitc`.`buffer_id` = `protbuff`.`buffer_id`)
              AND (ABS(`eitc`.`temperature` - `protbuff`.`temperature`) &lt; 3)
          JOIN `BVTS`.`experiment_tsa_protein_compound_view` `etsa` 
              ON ((`eitc`.`compound_id` = `etsa`.`compound_id`) 
              AND (`eitc`.`primary_group_label` = `etsa`.`primary_group_label`) 
              AND (ABS(`eitc`.`temperature` - `etsa`.`temperature`) &lt; 3))     
              ) AS `experu`
          JOIN `BVTS`.`compound` `c` ON (`c`.`id` = `experu`.`compound_id`)
          LEFT JOIN `BVTS`.`protein_group` `pg` ON `pg`.`label` = `experu`.`primary_group_label`
          JOIN `BVTS`.`protein` `p` ON `p`.`label` = `experu`.`protein_label`
      WHERE `experu`.`public` = 1
      GROUP BY `c`.`id` , `pg`.`name` , `experu`.`temperature`
      ORDER BY `c`.`id` , `pg`.`name` , `experu`.`temperature`
    </Selection>
    <UniqueKey>
      <Field>name</Field>
      <Field>temperature</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(name)s</RestfulDB:FKRepresentation>
  </Table>
<!-- Schema and data tracking -->
  <Table name="version" is_view="true" readonly="true">
    <Title>Versions</Title>
    <Description>Versions of Protein-Ligand Binding Database schema</Description>
    <Explanation>Versions of Protein-Ligand Binding Database schema</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Version  ID</Definition>
      <Explanation>Version  ID</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="uuid">
      <Title>UUID</Title>
      <Definition>Universally unique identifier</Definition>
      <Explanation>Universally unique identifier of version.</Explanation>
      <SQLDataType>varchar(40)</SQLDataType>
      <RestfulDB:Role>uuid</RestfulDB:Role>
    </Field>
    <Field name="timestamp" null="false">
      <Title>Timestamp</Title>
      <Definition>
        Timestamp of the version change (mandatory field)
      </Definition>
      <Explanation>Timestamp of the version change (mandatory field)</Explanation>
      <SQLDataType>timestamp</SQLDataType>
      <RegularExpression>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}</RegularExpression>
      <RestfulDB:Role>cdatetime</RestfulDB:Role>
    </Field>
    <Field name="schema_version" null="false">
      <Title>Schema version</Title>
      <Definition>
        Version of the database schema (mandatory field)
      </Definition>
      <Explanation>Version of the database schema (mandatory field)</Explanation>
      <SQLDataType>varchar(512)</SQLDataType>
    </Field>
    <Field name="changelog">
      <Title>Change Log</Title>
      <Definition>Change descriptions in this version</Definition>
      <Explanation>Change descriptions (CHANGELOG) inserted by automatic migration 
scripts or by a user performing manual migration</Explanation>
      <SQLDataType>text</SQLDataType>
      <RestfulDB:Role>markdown</RestfulDB:Role>
    </Field>
    <Field name="revision">
      <Title>DB Revision</Title>
      <Definition>
        Last database revision (as recorded in the table 'revision') in
        which this row was inserted or updated.
      </Definition>
      <ForeignKey>
        <ReferencedTable>revision</ReferencedTable>
        <ReferencedField>id</ReferencedField>
      </ForeignKey>
      <Code language="SQL" dialect="MySQL">
        revision_id
      </Code>
      <RestfulDB:Role>fk</RestfulDB:Role>
      <RestfulDB:Visualisation>table</RestfulDB:Visualisation>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`version`
    </Selection>
    <UniqueKey>
      <Field>uuid</Field>
    </UniqueKey>
    <UniqueKey>
      <Field>timestamp</Field>
    </UniqueKey>
    <UniqueKey>
      <Field>schema_version</Field>
    </UniqueKey>
  </Table>
  <Table name="revision" is_view="true" readonly="true">
    <Title>Revisions</Title>
    <Description>Data revisions of Protein-Ligand Binding Database</Description>
    <Explanation>Data revisions of Protein-Ligand Binding Database</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>Revision  ID</Definition>
      <Explanation>Revision  ID</Explanation>
      <SQLDataType>int unsigned</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="uuid">
      <Title>UUID</Title>
      <Definition>Universally unique identifier</Definition>
      <Explanation>Universally unique identifier of version.</Explanation>
      <SQLDataType>varchar(40)</SQLDataType>
      <RestfulDB:Role>uuid</RestfulDB:Role>
    </Field>
    <Field name="timestamp" null="false">
      <Title>Timestamp</Title>
      <Definition>
        Timestamp of the revision change (mandatory field)
      </Definition>
      <Explanation>Timestamp of the version change (mandatory field)</Explanation>
      <SQLDataType>timestamp</SQLDataType>
      <RegularExpression>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}</RegularExpression>
      <RestfulDB:Role>cdatetime</RestfulDB:Role>
    </Field>
    <Field name="user" null="false">
      <Title>User</Title>
      <Definition>Revision author</Definition>
      <Explanation>Shortened remote user name of the revision author</Explanation>
      <Code language="SQL" dialect="MySQL">
        SUBSTRING_INDEX(remote_user, '.', 1)
      </Code>
      <SQLDataType>varchar(128)</SQLDataType>
    </Field>
    <Field name="log_message">
      <Title>Log</Title>
      <Definition>Revision log message</Definition>
      <Explanation>Revision log message</Explanation>
      <SQLDataType>text</SQLDataType>
    </Field>
    <Selection language="SQL">
      FROM `BVTS`.`revision`
    </Selection>
    <UniqueKey>
      <Field>uuid</Field>
    </UniqueKey>
    <UniqueKey>
      <Field>timestamp</Field>
    </UniqueKey>
    <RestfulDB:FKRepresentation>%(timestamp).10s</RestfulDB:FKRepresentation>
  </Table>
  <Table name="key_tables_stats" is_view="true">
    <Title>Table statistics</Title>
    <Description>Records number in key tables of the `BVTS` database</Description>
    <Explanation>Single-row database view with dynamically updated number of records in 
`compound`, `crystal_structure` and experiments tables</Explanation>
    <Field name="id" null="false" primary_key="1" auto_increment="true">
      <Title>ID</Title>
      <Definition>The primary key of the table</Definition>
      <Code language="SQL" dialect="MySQL">
        0
      </Code>
      <SQLDataType>varchar(255)</SQLDataType>
      <RestfulDB:Role>id</RestfulDB:Role>
    </Field>
    <Field name="compounds">
      <Title>Compounds</Title>
      <Definition>Number of compounds</Definition>
      <Explanation>Number of the records in `compound` table</Explanation>
      <Code language="SQL" dialect="MySQL">
        MAX(stats.cmpds)
      </Code>
    </Field>
    <Field name="exp_tsa">
      <Title>N<sub>TSA</sub></Title>
      <Definition>Number of TSA experiments</Definition>
      <Explanation>Number of the records in `experiment_tsa` table</Explanation>
      <Code language="SQL" dialect="MySQL">
        MAX(stats.etsa)
      </Code>
      <SQLDataType>unsigned int</SQLDataType>
    </Field>
    <Field name="exp_itc">
      <Title>N<sub>ITC</sub></Title>
      <Definition>Number of ITC experiments</Definition>
      <Explanation>Number of the records in `experiment_itc` table</Explanation>
      <Code language="SQL" dialect="MySQL">
        MAX(stats.eitc)
      </Code>
      <SQLDataType>unsigned int</SQLDataType>
    </Field>
    <Field name="exp_sfa">
      <Title>N<sub>SFA</sub></Title>
      <Definition>Number of SFA experiments</Definition>
      <Explanation>Number of the records in `experiment_sfa` table</Explanation>
      <Code language="SQL" dialect="MySQL">
        MAX(stats.esfa)
      </Code>
      <SQLDataType>unsigned int</SQLDataType>
    </Field>
    <Field name="exp_spr">
      <Title>N<sub>SPR</sub></Title>
      <Definition>Number of SPR experiments</Definition>
      <Explanation>Number of the records in `experiment_spr` table</Explanation>
      <Code language="SQL" dialect="MySQL">
        MAX(stats.espr)
      </Code>
      <SQLDataType>unsigned int</SQLDataType>
    </Field>
    <Field name="x_structures">
      <Title>Crystal structures</Title>
      <Definition>Number of crystal structures</Definition>
      <Explanation>Number of the records in `crystal_structure` table</Explanation>
      <Code language="SQL" dialect="MySQL">
        MAX(stats.xstr)
      </Code>
      <SQLDataType>unsigned int</SQLDataType>
    </Field>
    <Field name="last_revision">
      <Title>Last revision</Title>
      <Definition>Last revision ID</Definition>
      <Explanation>The last `BVTS` database revision ID</Explanation>
      <Code language="SQL" dialect="MySQL">
        MAX(stats.last_rev)
      </Code>
      <SQLDataType>varchar(64)</SQLDataType>
      <RestfulDB:Resolvers>
        <RestfulDB:Resolver url="https://plbd.org/db/main/revision/" primary="true"/>
      </RestfulDB:Resolvers>
    </Field>
    <Field name="last_time">
      <Title>Last time</Title>
      <Definition>Last revision time</Definition>
      <Explanation>The `timestamp` field of the last revision</Explanation>
      <Code language="SQL" dialect="MySQL">
        MAX(stats.last_time)
      </Code>
      <SQLDataType>varchar(64)</SQLDataType>
    </Field>
    <Selection language="SQL">
      FROM
          (SELECT 
              COUNT(label) AS cmpds, 
              NULL AS etsa, 
              NULL AS eitc,
              NULL AS esfa, 
              NULL AS espr,
              NULL AS xstr,
              NULL as last_rev,
              NULL as last_time
          FROM
              `BVTS`.`compound`
          WHERE
              `BVTS`.`compound`.`public` = 1 
        UNION SELECT 
              NULL AS cmpds, 
              COUNT(label) AS etsa, 
              NULL AS eitc,
              NULL AS esfa, 
              NULL AS espr,
              NULL AS xstr,
              NULL as last_rev,
              NULL as last_time
          FROM
              `BVTS`.`experiment_tsa_protein_compound_view`
          WHERE
              `BVTS`.`experiment_tsa_protein_compound_view`.`public` = 1 
        UNION SELECT 
              NULL AS cmpds, 
              NULL AS etsa, 
              COUNT(label) AS eitc,
              NULL AS esfa, 
              NULL AS espr,
              NULL AS xstr,
              NULL as last_rev,
              NULL as last_time
          FROM
              `BVTS`.`experiment_itc_protein_compound_view`
          WHERE
              `BVTS`.`experiment_itc_protein_compound_view`.`public` = 1
        UNION SELECT 
              NULL AS cmpds, 
              NULL AS etsa, 
              NULL AS eitc,
              COUNT(label) AS esfa, 
              NULL AS espr,
              NULL AS xstr,
              NULL as last_rev,
              NULL as last_time
          FROM
              `BVTS`.`experiment_sfa_protein_compound_view`
          WHERE
              `BVTS`.`experiment_sfa_protein_compound_view`.`public` = 1
        UNION SELECT 
              NULL AS cmpds, 
              NULL AS etsa, 
              NULL AS eitc,
              NULL AS esfa, 
              COUNT(label) AS espr,
              NULL AS xstr,
              NULL as last_rev,
              NULL as last_time
          FROM
              `BVTS`.`experiment_spr_protein_compound_view`
          WHERE
              `BVTS`.`experiment_spr_protein_compound_view`.`public` = 1
        UNION SELECT 
              NULL AS cmpds, 
              NULL AS etsa, 
              NULL AS eitc,
              NULL AS esfa, 
              NULL AS espr,
              COUNT(label) AS xstr,
              NULL as last_rev,
              NULL as last_time
          FROM
              `BVTS`.`crystal_structure`
          WHERE
              `BVTS`.`crystal_structure`.`public` = 1
        UNION SELECT 
              NULL AS cmpds, 
              NULL AS etsa, 
              NULL AS eitc,
              NULL AS esfa, 
              NULL AS espr,
              NULL AS xstr,
              MAX(id) as last_rev,
              MAX(`timestamp`) as last_time
          FROM
              `BVTS`.`revision`
                  ) AS stats
      GROUP BY id
    </Selection>
  </Table>
  <Colophon>
  </Colophon>
</Database>