{"id":775,"date":"2023-03-24T14:32:38","date_gmt":"2023-03-24T14:32:38","guid":{"rendered":"https:\/\/doublelayer.eu\/vilab\/?p=775"},"modified":"2023-10-23T10:57:11","modified_gmt":"2023-10-23T10:57:11","slug":"visualizing-ase-atoms-in-jupyter-notebooks","status":"publish","type":"post","link":"https:\/\/doublelayer.eu\/vilab\/2023\/03\/24\/visualizing-ase-atoms-in-jupyter-notebooks\/","title":{"rendered":"Visualizing ASE atoms in Jupyter notebooks"},"content":{"rendered":"\n<p>For a long time I wanted to see ASE atoms in my Jupyter notebook. My previous attempts were usually unsuccessful. Today I decided to try again. First <a href=\"https:\/\/wiki.fysik.dtu.dk\/ase\/ase\/visualize\/visualize.html\">ASE wiki<\/a> suggests x3d and webngl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>view(atoms, viewer='x3d')\nview(atoms, viewer='ngl')<\/code><\/pre>\n\n\n\n<p>\u0141ucasz Mentel gives some useful tips in his <a href=\"https:\/\/lukaszmentel.com\/blog\/ase-jupyter-notebook\/index.html\">blogpost<\/a> from 2017.<\/p>\n\n\n\n<p>In my case x3d works and webngl fails. The x3d picture is not enought, and I do not want to spend much time on fixing webngl.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/doublelayer.eu\/vilab\/wp-content\/uploads\/2023\/03\/image.png\" alt=\"\" class=\"wp-image-776\" width=\"289\" height=\"177\" srcset=\"https:\/\/doublelayer.eu\/vilab\/wp-content\/uploads\/2023\/03\/image.png 289w, https:\/\/doublelayer.eu\/vilab\/wp-content\/uploads\/2023\/03\/image-220x135.png 220w\" sizes=\"auto, (max-width: 289px) 100vw, 289px\" \/><\/figure><\/div>\n\n\n<p><a href=\"https:\/\/ase-notebook.readthedocs.io\/en\/latest\/index.html\">ASE-notebook<\/a> is what works for me.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>conda create -n \"jupyter\"\nconda activate jupyter\nconda install -c conda-forge ase-notebook\nconda install -c conda-forge jupyterlab<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"401\" height=\"402\" src=\"https:\/\/doublelayer.eu\/vilab\/wp-content\/uploads\/2023\/03\/image-1.png\" alt=\"\" class=\"wp-image-777\" srcset=\"https:\/\/doublelayer.eu\/vilab\/wp-content\/uploads\/2023\/03\/image-1.png 401w, https:\/\/doublelayer.eu\/vilab\/wp-content\/uploads\/2023\/03\/image-1-300x300.png 300w, https:\/\/doublelayer.eu\/vilab\/wp-content\/uploads\/2023\/03\/image-1-150x150.png 150w, https:\/\/doublelayer.eu\/vilab\/wp-content\/uploads\/2023\/03\/image-1-220x220.png 220w\" sizes=\"auto, (max-width: 401px) 100vw, 401px\" \/><\/figure><\/div>\n\n\n<p>By the way, the model is from my &#8220;Surface Curvature Effect on Dual-Atom Site Oxygen Electrocatalysis&#8221; <a href=\"https:\/\/pubs.acs.org\/doi\/full\/10.1021\/acsenergylett.3c00068\">paper<\/a>, which you can read at <a href=\"https:\/\/chemrxiv.org\/engage\/chemrxiv\/article-details\/637ca619ebc1c74a51ce1dc3\">chemRxiv<\/a> until it turns Gold Open Access.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For a long time I wanted to see ASE atoms in my Jupyter notebook. My previous attempts were usually unsuccessful. Today I decided to try again. First ASE wiki suggests x3d and webngl: \u0141ucasz Mentel gives some useful tips in his blogpost from 2017. In my case x3d works and webngl fails. The x3d picture&hellip; <a class=\"read-more\" href=\"https:\/\/doublelayer.eu\/vilab\/2023\/03\/24\/visualizing-ase-atoms-in-jupyter-notebooks\/\">Read More<\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,40],"tags":[],"class_list":["post-775","post","type-post","status-publish","format-standard","hentry","category-notes","category-opensource"],"_links":{"self":[{"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/posts\/775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/comments?post=775"}],"version-history":[{"count":6,"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/posts\/775\/revisions"}],"predecessor-version":[{"id":862,"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/posts\/775\/revisions\/862"}],"wp:attachment":[{"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/media?parent=775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/categories?post=775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doublelayer.eu\/vilab\/wp-json\/wp\/v2\/tags?post=775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}