-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFeature_Statis_display.php
More file actions
190 lines (157 loc) · 6.61 KB
/
Copy pathFeature_Statis_display.php
File metadata and controls
190 lines (157 loc) · 6.61 KB
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<?php
session_start();
?>
<?php
include "navigation.html";
require_once 'login.php';
require_once 'redir.php';
?>
<div id="write" class="container">
<h2>Results of features statistics</h2>
<hr>
<?php
// Results
echo <<<_MAIN2
<table class="pure-table tablesorter" align="center" id="myTable">
<thead><th>Features</th><th>Average</th><th>Maximum</th><th>Minimum</th><th>Standard Deviation</th>
</tr>
</thead>
<tbody>
_MAIN2;
// connect to MySQL
$db_server = mysql_connect( $db_hostname, $db_username, $db_password );
if ( !$db_server )die( "Unable to connect to database: " . mysql_error() );
mysql_select_db( $db_database, $db_server )or die( "Unable to select database: " . mysql_error() );
$query_natm = sprintf( "SELECT AVG(natm), MAX(natm), MIN(natm), STDDEV(natm) FROM Compounds" );
$result_natm = mysql_query( $query_natm );
$row_natm = mysql_fetch_row( $result_natm );
echo '<tr>';
echo "<td>Number of Atoms</td>";
echo '<td>' .round($row_natm[ 0 ], 4) . '</td>';
echo '<td>' .round($row_natm[ 1 ], 4) . '</td>';
echo '<td>' .round($row_natm[ 2 ], 4) . '</td>';
echo '<td>' .round($row_natm[ 3 ], 4) . '</td>';
echo '</tr>';
$query_ncar = sprintf( "SELECT AVG(ncar), MAX(ncar), MIN(ncar), STDDEV(ncar) FROM Compounds" );
$result_ncar = mysql_query( $query_ncar );
$row_ncar = mysql_fetch_row( $result_ncar );
echo '<tr>';
echo "<td>Number of Carbons</td>";
echo '<td>' .round($row_ncar[ 0 ], 4) . '</td>';
echo '<td>' .round($row_ncar[ 1 ], 4) . '</td>';
echo '<td>' .round($row_ncar[ 2 ], 4) . '</td>';
echo '<td>' .round($row_ncar[ 3 ], 4) . '</td>';
echo '</tr>';
$query_nnit = sprintf( "SELECT AVG(nnit), MAX(nnit), MIN(nnit), STDDEV(nnit) FROM Compounds" );
$result_nnit = mysql_query( $query_nnit );
$row_nnit = mysql_fetch_row( $result_nnit );
echo '<tr>';
echo "<td>Number of Nitrogens</td>";
echo '<td>' .round($row_nnit[ 0 ], 4) . '</td>';
echo '<td>' .round($row_nnit[ 1 ], 4) . '</td>';
echo '<td>' .round($row_nnit[ 2 ], 4) . '</td>';
echo '<td>' .round($row_nnit[ 3 ], 4) . '</td>';
echo '</tr>';
$query_noxy = sprintf( "SELECT AVG(noxy), MAX(noxy), MIN(noxy), STDDEV(noxy) FROM Compounds" );
$result_noxy = mysql_query( $query_noxy );
$row_noxy = mysql_fetch_row( $result_noxy );
echo '<tr>';
echo "<td>Number of Oxygens</td>";
echo '<td>' .round($row_noxy[ 0 ], 4) . '</td>';
echo '<td>' .round($row_noxy[ 1 ], 4) . '</td>';
echo '<td>' .round($row_noxy[ 2 ], 4) . '</td>';
echo '<td>' .round($row_noxy[ 3 ], 4) . '</td>';
echo '</tr>';
$query_nsul = sprintf( "SELECT AVG(nsul), MAX(nsul), MIN(nsul), STDDEV(nsul) FROM Compounds" );
$result_nsul = mysql_query( $query_nsul );
$row_nsul = mysql_fetch_row( $result_nsul );
echo '<tr>';
echo "<td>Number of Sulphurs</td>";
echo '<td>' .round($row_nsul[ 0 ], 4) . '</td>';
echo '<td>' .round($row_nsul[ 1 ], 4) . '</td>';
echo '<td>' .round($row_nsul[ 2 ], 4) . '</td>';
echo '<td>' .round($row_nsul[ 3 ], 4) . '</td>';
echo '</tr>';
$query_ncycl = sprintf( "SELECT AVG(ncycl), MAX(ncycl), MIN(ncycl), STDDEV(ncycl) FROM Compounds" );
$result_ncycl = mysql_query( $query_ncycl );
$row_ncycl = mysql_fetch_row( $result_ncycl );
echo '<tr>';
echo "<td>Number of Cycles</td>";
echo '<td>' .round($row_ncycl[ 0 ], 4) . '</td>';
echo '<td>' .round($row_ncycl[ 1 ], 4) . '</td>';
echo '<td>' .round($row_ncycl[ 2 ], 4) . '</td>';
echo '<td>' .round($row_ncycl[ 3 ], 4) . '</td>';
echo '</tr>';
$query_nhdon = sprintf( "SELECT AVG(nhdon), MAX(nhdon), MIN(nhdon), STDDEV(nhdon) FROM Compounds" );
$result_nhdon = mysql_query( $query_nhdon );
$row_nhdon = mysql_fetch_row( $result_nhdon );
echo '<tr>';
echo "<td>Number of Hydrogen Donors</td>";
echo '<td>' .round($row_nhdon[ 0 ], 4) . '</td>';
echo '<td>' .round($row_nhdon[ 1 ], 4) . '</td>';
echo '<td>' .round($row_nhdon[ 2 ], 4) . '</td>';
echo '<td>' .round($row_nhdon[ 3 ], 4) . '</td>';
echo '</tr>';
$query_nhacc = sprintf( "SELECT AVG(nhacc), MAX(nhacc), MIN(nhacc), STDDEV(nhacc) FROM Compounds" );
$result_nhacc = mysql_query( $query_nhacc );
$row_nhacc = mysql_fetch_row( $result_nhacc );
echo '<tr>';
echo "<td>Number of Hydrogen Acceptors</td>";
echo '<td>' .round($row_nhacc[ 0 ], 4) . '</td>';
echo '<td>' .round($row_nhacc[ 1 ], 4) . '</td>';
echo '<td>' .round($row_nhacc[ 2 ], 4) . '</td>';
echo '<td>' .round($row_nhacc[ 3 ], 4) . '</td>';
echo '</tr>';
$query_nrotb = sprintf( "SELECT AVG(nrotb), MAX(nrotb), MIN(nrotb), STDDEV(nrotb) FROM Compounds" );
$result_nrotb = mysql_query( $query_nrotb );
$row_nrotb = mysql_fetch_row( $result_nrotb );
echo '<tr>';
echo "<td>Number of Rotatable Bonds</td>";
echo '<td>' .round($row_nrotb[ 0 ], 4) . '</td>';
echo '<td>' .round($row_nrotb[ 1 ], 4) . '</td>';
echo '<td>' .round($row_nrotb[ 2 ], 4) . '</td>';
echo '<td>' .round($row_nrotb[ 3 ], 4) . '</td>';
echo '</tr>';
$query_mw = sprintf( "SELECT AVG(mw), MAX(mw), MIN(mw), STDDEV(mw)FROM Compounds" );
$result_mw = mysql_query( $query_mw );
$row_mw = mysql_fetch_row( $result_mw );
echo '<tr>';
echo "<td>Molecular Weight</td>";
echo '<td>' .round($row_mw[ 0 ], 4) . '</td>';
echo '<td>' .round($row_mw[ 1 ], 4) . '</td>';
echo '<td>' .round($row_mw[ 2 ], 4) . '</td>';
echo '<td>' .round($row_mw[ 3 ], 4) . '</td>';
echo '</tr>';
$query_TPSA = sprintf( "SELECT AVG(TPSA), MAX(TPSA), MIN(TPSA), STDDEV(TPSA) FROM Compounds" );
$result_TPSA = mysql_query( $query_TPSA );
$row_TPSA = mysql_fetch_row( $result_TPSA );
echo '<tr>';
echo "<td>The Polar Surface Area</td>";
echo '<td>' .round($row_TPSA[ 0 ], 4) . '</td>';
echo '<td>' .round($row_TPSA[ 1 ], 4) . '</td>';
echo '<td>' .round($row_TPSA[ 2 ], 4) . '</td>';
echo '<td>' .round($row_TPSA[ 3 ], 4) . '</td>';
echo '</tr>';
$query_XLogP = sprintf( "SELECT AVG(XLogP), MAX(XLogP), MIN(XLogP), STDDEV(XLogP) FROM Compounds" );
$result_XLogP = mysql_query( $query_XLogP );
$row_XLogP = mysql_fetch_row( $result_XLogP );
echo '<tr>';
echo "<td>Estimated LogP</td>";
echo '<td>' .round($row_XLogP[ 0 ], 4) . '</td>';
echo '<td>' .round($row_XLogP[ 1 ], 4) . '</td>';
echo '<td>' .round($row_XLogP[ 2 ], 4) . '</td>';
echo '<td>' .round($row_XLogP[ 3 ], 4) . '</td>';
echo '</tr>';
echo '</tbody>';
echo '</table>';
echo "</div>";
mysql_close( $db_server );
echo <<<_TAIL1
<br>
<br>
<br>
</body>
</html>
_TAIL1;
?>
</div>