-
Notifications
You must be signed in to change notification settings - Fork 4
/
cod-tags.html
176 lines (163 loc) · 5.02 KB
/
cod-tags.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html lang="en">
<head>
<title>COD Tags</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#f0e0d0">
<style>
html { margin: 0 auto; overflow-y: scroll; color: #3b4044;
background-color: #ddc; }
body { font: 13px sans-serif; line-height: 150%; margin: 0; }
h1 { text-align: center; font-size: 30px; font-weight: normal; }
h2 { text-align: center; font-size: 20px; margin-top: 40px; }
a { text-decoration: none; border-bottom: 1px dashed; color: #24a; }
#footnote { font-size: 12px; text-align: center; padding: 30px 0; }
table { width: 100%; border-collapse: collapse; background-color: #f8f8f8; }
table, th, td { border: 1px solid #888; }
table { box-shadow: 2px 2px 4px rgba(0,0,0,0.20); }
th, td { padding: 6px; }
table th { background: #eee; }
td { text-align: right; }
td:first-child, td:last-child { text-align: left; }
code { background: #68A; color: #fff; font: 12px sans-serif; padding: 0 1px;
margin-bottom: 4px; }
@media only screen and (max-width: 950px) { html { margin: 0; } }
nav { font-size: 16px; margin: 30px; }
nav a { margin-left: 15px; }
/* tablesort.css */
th[role=columnheader]:not(.no-sort) {
cursor: pointer;
}
th[role=columnheader]:not(.no-sort):after {
content: '';
float: right;
margin-top: 7px;
border-width: 0 4px 4px;
border-style: solid;
border-color: #404040 transparent;
visibility: hidden;
opacity: 0;
-ms-user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
th[aria-sort=ascending]:not(.no-sort):after {
border-bottom: none;
border-width: 4px 4px 0;
}
th[aria-sort]:not(.no-sort):after {
visibility: visible;
opacity: 0.4;
}
th[role=columnheader]:not(.no-sort):hover:after {
visibility: visible;
opacity: 1;
}
span[eg] {
position: relative;
}
span[eg]:hover:after {
content: "e.g.\00a0" attr(eg);
display: block;
z-index: 10;
background-color: rgba(255,255,204,0.8); /*#ffc*/
padding: 0 3px;
border: 1px solid rgba(238,238,170,0.8); /*#eea*/
position: absolute;
top: -100%;
left: 10%;
}
</style>
</head>
<body>
<h1>Crystallography Open Database CIF Tags</h1>
<nav id="nav">
Jump to:
<a href="#coor">CIF Files</a>
<a href="#sf">HKL Files</a>
</nav>
<h2 id="coor">CIF Files</h2>
<table id="coor-table">
<thead>
<tr data-sort-method='thead'>
<th rowspan="2" aria-sort="ascending">Tag</th>
<th rowspan="2" data-sort-method="number">in %</th>
<th data-sort-method="number">min</th>
<th data-sort-method="number">avg</th>
<th data-sort-method="number">max</th>
<th rowspan="2" data-sort-method="none" class="no-sort">values</th>
</tr>
<tr>
<th colspan="3">values per block</th>
</tr>
</thead>
</table>
<h2 id="sf">HKL Files</h2>
<table id="sf-table">
<thead>
<tr data-sort-method='thead'>
<th rowspan="2" aria-sort="ascending">Tag</th>
<th rowspan="2" data-sort-method="number">in %</th>
<th data-sort-method="number">min</th>
<th data-sort-method="number">avg</th>
<th data-sort-method="number">max</th>
<th rowspan="2" data-sort-method="none" class="no-sort">values</th>
</tr>
<tr>
<th colspan="3">values per block</th>
</tr>
</thead>
</table>
<div id="footnote">
This is part of the
<a href="https://project-gemmi.github.io/">project GEMMI</a>.
Uses <a href="https://d3js.org/">d3.js</a>
and <a href="http://tristen.ca/tablesort/demo/">tablesort</a>.
Data was extracted from the COD on 2021-04-23.
<p><b><a href="https://github.com/project-gemmi/pdb-stats">
Source code and info...</a></b>
</div>
<!--script src="https://d3js.org/d3.v4.min.js"></script-->
<script src="js/d3-collection.v1.min.js"></script>
<script src="js/d3-dispatch.v1.min.js"></script>
<script src="js/d3-dsv.v1.min.js"></script>
<script src="js/d3-request.v1.min.js"></script>
<script src="js/d3-selection.v1.min.js"></script>
<script src="js/tablesort.min.js"></script>
<script>
"use strict";
function tr_html(d) {
var row = '<td>' + d[0] + '</td><td>' + d[1] + '</td><td>' +
d[2] + '</td><td>' + d[3] + '</td><td>' + d[4] + '</td><td>';
for (var i = 5; i < d.length; ++i) {
var s1 = d[i].indexOf(' ');
var s2 = d[i].indexOf(' ', s1+1);
row += '<span eg="' + d[i].substring(s1+1, s2) + '">';
row += d[i].substring(0, s1);
if (d[i][s2+1] === '{') {
row += '×' + d[i].substring(s2+1);
} else {
row += '×<code>' + d[i].substring(s2+1) + '</code>';
}
row += '</span> ';
}
return row + '</td>';
}
d3.text('cod-cif-tags.tsv', function(text) {
var data = d3.tsvParseRows(text);
var tbody = d3.select('#coor-table').append('tbody');
tbody.selectAll('tr').data(data).enter().append('tr').html(tr_html);
new Tablesort(document.getElementById('coor-table'));
});
d3.text('cod-hkl-tags.tsv', function(text) {
var data = d3.tsvParseRows(text);
var tbody = d3.select('#sf-table').append('tbody');
tbody.selectAll('tr').data(data).enter().append('tr').html(tr_html);
new Tablesort(document.getElementById('sf-table'));
});
</script>
</body>
</html>
<!-- vim: set et ts=2 sw=2: -->