New publication in Surface Science on alloy core level shifts

| categories: news | tags:

In this collaborative paper with the Gellman group, we show an anomalous core-level shift in Cu-Pd alloys that corresponds to a composition-dependent alloy crystal structure. We use DFT to model the core level shifts. Congratulations Jake!

http://www.sciencedirect.com/science/article/pii/S0039602815000461

@article{Boes2015,
  title =        "Core level shifts in Cu-Pd alloys as a function of bulk
                  composition and structure ",
  journal =      "Surface Science ",
  volume =       "",
  number =       "0",
  pages =        " - ",
  year =         "2015",
  note =         "",
  issn =         "0039-6028",
  doi =          "https://doi.org/10.1016/j.susc.2015.02.011",
  url =
                  "http://www.sciencedirect.com/science/article/pii/S0039602815000461",
  author =       "Jacob Boes and Peter Kondratyuk and Chunrong Yin and James
                  B. Miller and Andrew J. Gellman and John R. Kitchin",
}

Copyright (C) 2015 by John Kitchin. See the License for information about copying.

org-mode source

Org-mode version = 8.2.10

Discuss on Twitter

org-mode links meet hydra

| categories: hydra, orgmode, emacs | tags:

I have played with a lot of options to give org-mode links extra functionality. Here are a few of the ideas I have looked at so far.

  1. Enabling right clicks on links
  2. A home made minibuffer menu in org-ref
  3. A helm buffer in org-ref

Here, I want to explore a hydra menu for a link. The idea is pretty simple, we need functions that do something with the link at point, and a hydra interface to call them. This turned out to be a little tricky. I could not get the path from the link in the link lambda function, and we need a way to pass the path to the function. I use a global variable for that. I wish there was another way to do that, but this does actually work. We illustrate it here with a more functional doi link.

(defun doi-crossref ()
  "Search DOI in CrossRef."
  (interactive)
  (browse-url
   (format
    "http://search.crossref.org/?q=%s" *doi-hydra-path*)))

(defun doi-google-scholar ()
  "Google scholar the doi."
  (interactive)
  (browse-url
   (format
    "http://scholar.google.com/scholar?q=%s" *doi-hydra-path*)))

(defun doi-pubmed ()
  "Pubmed the doi."
  (interactive)
  (browse-url
   (format
    "http://www.ncbi.nlm.nih.gov/pubmed/?term=%s"
    (url-hexify-string *doi-hydra-path*))))

 (defhydra doi-hydra ()
   "org-ref"
   ("c" doi-crossref "Crossref")
   ("g" doi-google-scholar "Google Scholar")
   ("p" doi-pubmed "Pubmed"))

(org-add-link-type "doi"
  (lambda (path) (setq *doi-hydra-path* path) (doi-hydra/body)))
lambda (path) (setq doi-hydra-path path) (doi-hydra/body)

Now for a test, 10.1021/jp047349j.

It works fine, when you click on a link, you get a minibuffer menu with context hints, and pressing any other key than is defined simply cancels the command.

Copyright (C) 2015 by John Kitchin. See the License for information about copying.

org-mode source

Org-mode version = 8.2.10

Discuss on Twitter

org-ref meets hydra

| categories: emacs | tags:

I am enjoying learning about abo-abo/hydra , which is a nice package for making minibuffer menus to run commands. It is light-weight solution that does not mess up your window too much, and it is easier to use than any home-grown solution I have made in the past. Here is a simple little code that gives me three options when I press "zz" quickly (a key-chord). I can press "c" to put in a cite link using helm, "r" to insert a ref link using helm, and "l" to insert a new label. Any other key just cancels the menu. One thing to remember ("zz"), and hints for the rest!

(require 'hydra)
(setq hydra-is-helpful t)

(require 'key-chord)
(key-chord-mode 1)
(key-chord-define-global
 "zz"
 (defhydra org-ref-hydra ()
   "org-ref"
   ("c" org-ref-helm-insert-cite-link "cite")
   ("r" org-ref-helm-insert-ref-link "ref")
   ("l" org-ref-helm-insert-label-link "label")
   ("R" org-ref "org-ref")))
org-ref-hydra/body

Pretty nice. Check out the nice hydra interface to words.el . A simple press of "ww" gets you easy access to single key presses of all the nice words functions. What would you hydra for?

Copyright (C) 2015 by John Kitchin. See the License for information about copying.

org-mode source

Org-mode version = 8.2.10

Discuss on Twitter

New publication on effects of Linear Response U on OER trends

| categories: news | tags:

In this paper we explore the role DFT+U on oxygen evolution reactivity trends, and the role that linear response U can play in predicting these properties. Congratulations Zhongnan!

@article{xu-2015-linear-respon,
  author = {Xu, Zhongnan and Rossmeisl, Jan and Kitchin, John R.},
  title = {A Linear Response {DFT}+{U} Study of Trends in the Oxygen
                  Evolution Activity of Transition Metal Rutile Dioxides},
  journal = {The Journal of Physical Chemistry C},
  volume = 0,
  number = 0,
  pages = {null},
  year = 2015,
  doi = {10.1021/jp511426q},
  url = { https://doi.org/10.1021/jp511426q },
  eprint = { https://doi.org/10.1021/jp511426q },
}

http://pubs.acs.org/doi/abs/10.1021/jp511426q

Copyright (C) 2015 by John Kitchin. See the License for information about copying.

org-mode source

Org-mode version = 8.2.10

Discuss on Twitter

Extending the org-mode link syntax with attributes

| categories: orgmode, emacs | tags:

I make super heavy use of links in org-mode. I use them extensively in org-ref to create functional citations. One detail that has never been very satisfactory is the need for pre/post text in citations. I don't need that capability often, but it seems important to some. I have implemented a kind of clunky solution where I use the description part of a link with the pre/post text separated by a ::. Although that works, I dislike the way it looks, the need to parse it, and that the description covers the link.

[[cite:key][pre text::post text]]

Some time ago there was a suggestion of how to extend the link syntax, which was to my knowledge never implemented. Here is the proposed syntax:

$[link http://google.com
         :last-followed [2009-02-25 Wed 02:00]
         :label "click here for evil search engine"
         :export-label "click here for nice search engine"]

This is interesting because this syntax suggests the link has attributes which can be updated.

We will show here how to implement part of this idea with the existing link syntax. We will make a link that has attributes like that. The basic idea is to simply incorporate the attributes into the path, and use lisp to read them. We will wrap the link path in parentheses and read that as a lisp data structure. So, a link like link:key :pre "some pre text" :post "some post text" will be parsed as:

(read "(key :pre \"some pre text\" :post \"some post text\")")
key :pre some pre text :post some post text

The car of that list is the key, and the cdr contains the attributes. The quotes are necessary here to make sure all the text is correctly parsed as a single element for each attribute. So, here is an example link

(org-add-link-type
 "slink"
 ;;  follow function
 (lambda (path)
   (let* ((data (read (format "(%s)" path)))
          (head (car data))
          (plist (cdr data))
          (link (org-element-context))
          (begin (org-element-property :begin link))
          (end (org-element-property :end link)))
     (setq plist (plist-put plist :last-clicked (current-time-string)))
     (save-excursion
     (setf (buffer-substring begin end) "")
     (goto-char begin)
     (insert (format "[[slink:%s %s]]" head
         (substring (format "%S" plist) 1 -1))))))
 ;; format function
 (lambda (path description backend)
   (let* ((data (read (concat "(" path ")")))
          (head (car data))
          (plist (cdr data)))
     (format "\\%s[%s][%s]{%s}"
             (plist-get plist :type)
             (plist-get plist :pre)
             (plist-get plist :post)
             head))))

Now, each time I click on this link, the time stamp gets updated.

\cite[See for example][page 47]{kitchin-2010}

[[slink:kitchin-2010 :pre "See for example" :post "page 47" :type "cite" :last-clicked "Thu Feb  5 09:31:15 2015"]]

And, the generic export of this link is:

\cite[See for example][page 47]{kitchin-2010}

Is this a good idea? I am not using this for anything right now. Sometimes my version of org-mode has trouble recognizing that is a link. It is strange, as I am typing, sometimes it flashes in and out of being recognized as a link. Anyway, it is an interesting idea!

Copyright (C) 2015 by John Kitchin. See the License for information about copying.

org-mode source

Org-mode version = 8.2.10

Discuss on Twitter
« Previous Page -- Next Page »