Chair Cyclohexane
Author: Dennis Svatunek
Date:
28.01.2024
Version:
1.0
License:
CC BY-NC
Description:
Chair Cyclohexane
View Code
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://3Dmol.org/build/3Dmol-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<div style="text-align: center;">
<div id="D0607" style="margin: auto; width: 500px; height: 500px;"></div>
</div>
<script>
(function() {
$(document).ready(function() {
var viewer = $3Dmol.createViewer("D0607", {defaultcolors: $3Dmol.elementColors.Jmol});
var xyz = `18
0 1
C -1.137553 0.907652 0.229233
C 0.216895 1.438789 -0.229351
C -1.354566 -0.531409 -0.228985
C 1.354567 0.531400 0.229000
C -0.216883 -1.438789 0.229356
C 1.137554 -0.907649 -0.229252
H -1.941568 1.548204 -0.140900
H -1.190395 0.950481 1.322845
H 0.226560 1.506308 -1.322901
H 0.370116 2.455270 0.141162
H -1.417331 -0.556299 -1.322702
H -2.311450 -0.907689 0.140583
H 1.417299 0.556266 1.322720
H 2.311462 0.907691 -0.140529
H -0.226533 -1.506300 1.322907
H -0.370111 -2.455274 -0.141146
H 1.941579 -1.548214 0.140835
H 1.190361 -0.950444 -1.322867`;
viewer.addModel(xyz, "xyz");
viewer.setStyle({}, {stick: {radius: 0.15}, sphere: {scale: 0.25}});
viewer.zoomTo();
viewer.rotate(90, {vx: 1, vy: 0, vz: 0});
viewer.rotate(180, {vx: 0, vy: 0, vz: 1});
viewer.rotate(35, {vx: 0, vy: 1, vz: 0});
viewer.rotate(10, {vx: 1, vy: 0, vz: 0});
viewer.zoom(1.4);
viewer.setBackgroundColor('#f9f9f9');
viewer.setViewStyle({style: 'outline', color: 'black', width: 0.02});
viewer.render();
$("#D0607").css("position", "relative");
});
})();
</script>