Source

crystallography / crystallography-handler / src / main / resources / net / chempound / crystal / templates / crystal.ftl

Full commit
<#-- @ftlvariable name="_" type="net.chempound.crystal.rdf.CrystalStructure" -->
<div class="crystaleye-structure">

    <h1><#if _.title??>${_.title}<#else>${uri}</#if></h1>

    <div class="jmol">
        <div id="jmol"></div>
    </div>

    <div class="data">

        <dl class="bib bib-citation">
            <dt>Publisher:</dt>
            <dd>${_.journalNameFull!}</dd>
            <dt>Journal:</dt>
            <dd>${_.journalNameFull!}</dd>
            <dt>Year:</dt>
            <dd>${_.journalYear!}</dd>
            <dt>Volume/Issue:</dt>
            <dd>${_.journalVolume!} / ${_.journalIssue!}</dd>
            <dt>DOI:</dt>
            <dd><#if _.doi??><a href="http://dx.doi.org/${_.doi}">${_.doi}</a></#if></dd>
        </dl>

        <dl class="bib bib-author">
            <dt>Contact Author:</dt>
            <dd>${(_.publContactAuthorName!)?html}</dd>
            <dt>email:</dt>
            <dd><#if _.publContactAuthorName??><a href="mailto:${_.publContactAuthorEmail}">${_.publContactAuthorEmail}</a></#if></dd>
        </dl>


        <h2>Data collection parameters</h2>

        <dl class="data">
            <dt>Chemical formula sum</dt>
            <dd property="${IUCR.chemicalFormulaSum}">${_.chemicalFormulaSum!}</dd>
            <dt>Chemical formula moiety</dt>
            <dd property="${IUCR.chemicalFormulaMoiety}">${_.chemicalFormulaMoiety!}</dd>
            <dt>Crystal system</dt>
            <dd property="${IUCR.spaceGroupCrystalSystem}">${_.spaceGroupCrystalSystem!}</dd>
            <dt>Space group H-M</dt>
            <dd property="${IUCR.symmetrySpaceGroupNameHM}">${_.spaceGroupNameHMAlt!}</dd>
            <dt>Space group Hall</dt>
            <dd property="${IUCR.symmetrySpaceGroupNameHall}">${_.spaceGroupNameHall!}</dd>
            <dt>Data collection temperature</dt>
            <dd property="${IUCR.diffrnAmbientTemperature}">${_.diffrnAmbientTemperature!} K</dd>
        </dl>


        <h2>Refinement results</h2>

        <dl class="data">
            <dt>R Factor (Obs)</dt>
            <dd property="${IUCR.refineLsRFactorGt}">${_.refineLsRFactorGt!}</dd>
            <dt>R Factor (All)</dt>
            <dd property="${IUCR.refineLsRFactorAll}">${_.refineLsRFactorAll!}</dd>
            <dt>Weighted R Factor (Obs)</dt>
            <dd property="${IUCR.refineLsWrFactorGt}">${_.refineLsWrFactorGt!}</dd>
            <dt>Weighted R Factor (All)</dt>
            <dd property="${IUCR.refineLsWrFactorRef}">${_.refineLsWrFactorRef!}</dd>
        </dl>


        <h2>Result files</h2>

        <ul class="files">
            <li><a href="${_.cmlFile}">Chemical Markup Language</a></li>
            <li><#if cifOriginal??><a href="${cifOriginal}" title="CIF file - original">CIF file</a> [<a href="${_.cifFile}" title="CIF file - local cache">local cache</a>]<#else><a href="${_.cifFile}" title="CIF file">CIF File</a></#if> </li>
            <li><a href="${_.rdfXmlFile}">RDF XML</a> / <a href="${_.rdfN3File}">RDF N3</a></li>
        </ul>

    </div>

    <div class="clear"></div>

    <div class="identifiers">

        <h2>Identifiers</h2>

        <dl class="identifier">
            <dt>InChI:</dt>
            <dd>${_.inchi}</dd>
            <dt>InChIKey:</dt>
            <dd>${_.inchiKey}
                <a href="${URI_BASE}/search/?search_provider=structure&inchi_key=${_.inchiKey}&submit=search"" rel="nofollow">[?]</a></dd>
        </dl>

<#list _.molecularEntities as entry>
        <dl class="identifier">
            <dt>InChI:</dt>
            <dd>${entry.inchi}</dd>
            <dt>InChIKey:</dt>
            <dd>${entry.inchiKey}
                <a href="${URI_BASE}/search/?search_provider=structure&inchi_key=${entry.inchiKey}&submit=search"" rel="nofollow">[?]</a></dd>
        </dl>
</#list>
        <div class="clear"></div>

    </div>

</div>

<script type="text/javascript">
    $(document).ready(function() {
        var useSignedApplet = true;
        jmolInitialize("${URI_BASE}/plugins/jmol/jmol/", useSignedApplet);

        $("#jmol").jmol({
            'img': "${_.imageFile}",
            'url': "${_.cifPath}",
            'script': "load $ {1 1 1}"
        });
    });
</script>