Upgraded macOS from Catalina to Big Sur today. So far almost no trouble occured after this OS upgrade except that there is an error when I tried to compile some program with using gfortran such as,
clang: error: invalid version number in '-mmacosx-version-min=11.0' But this was solved by updating Xcode via App Store.
I prefer the appearance of Big Sur to Catalina ;)
論文覚書. B. Yin and W. A. Curtin, “Origin of high strength in the CoCrFeNiPd high-entropy alloy,” Mater. Res. Lett., vol. 8, no. 6, pp. 209–215, 2020. B. Yin, S. Yoshida, N. Tsuji, and W. A. Curtin, “Yield strength and misfit volumes of
If you are using remote computers on a daily basis, you probably use rsync command for transfering data between the local machine and remote machines. And you may need to type remote directory every time you use rsync command, which is a small effort for a single case but it costs a lot if you do the smae thing many times. The script rsync_wrapper.py is a helper script to avoid typing remote directory every time you use rsync.
Appearance of Jupyter Notebook can be modified using jupyter-themes. See the following websites for details, jupyterの表示拡張機能、jupyter-themesを徹底紹介する jupyter-themes の fontについて Chrome extension Stylish should be installed in addition to
When I tried to connect to macOS Mojave machine from other machine, I got the following message.
X11 forwarding request failed on channel 0 And when using -v option, I got
debug1: Remote: No xauth program; cannot forward X11. X11 forwarding request failed on channel 0 So the problem seemed to be an issue of xauth-related, and actually this was because the remote server could not find the xauth program, even though I do not know the reason why.
There is an erratum in the JAP journal paper (Ref.[1]) by Bonny et al about tungsten-rhenium EAM potential. The parameters for $V_\mathrm{WRe}$ listed in the paper, cubic spline with 5 knots, were not sufficient and the following 6th knot should be added.
r_6 = 4.2 a_6 = -0.25133241 I extracted these numbers by numerical derivative of raw data provided in Ref.[2], so the precision of the data may not be so high.
Currently this site uses the pelican theme Flex, and I like it. But one thing annoyed me. There is a logo image on the left side and it works fine with the home, archive, and tag pages. But it does not show up on post pages. The reason is that the path to the logo image is set in pelicanconf.py and it seems to be relative URL from the current content which is dependent on the article.
I made a simple script that removes files specified by a file .clean in the current working directory.
The script is like this.
#!/bin/bash CLEAN_FILE='.clean' if [ ! -f ${CLEAN_FILE} ]; then echo " There is no " ${CLEAN_FILE} " file." echo " You write a list of files to be cleaned into " ${CLEAN_FILE} " file." echo " Then this script will remove these files from the current directory.
tmux is a great command when using remote servers for work. Mainly because once I turn on tmux on the remote server, I can recover the session whenever I reconnect the server again. This feature is greater than it sounds. If you have not tried tmux yet, and you often work on the remote server, you definitely should use tmux.
But when I try to use gnuplot or something that needs X11 forwarding through SSH, sometimes you need to change DISPLAY environment variable in tmux session.
When I was using tmux on a remote server in Terminal.app and tried to type something in addition to existing text, sometimes display went wrong not shifting the existing text rather overriding the text.
This seems a problem of setting of TERM environment variable of the shell used. So I changed the TERM variable from xterm-color to xterm-256color and the problem was fixed.
In Ovito, there are following modifications to the view,
Common neighbor analysis (CNA) Expression select Delete selected particles So you can use CNA to identify which atoms are FCC-like and which are not. Then you can select FCC atoms using Expression select by adding the following expression into the Boolean expression: text box,
StructureType == 1 And by adding Delete selected particles modification, you can see only non-FCC atoms in the view.
Ovito is a visualization tool for atomistic configurations and simulation results.
When I open a file from command line, I had to directly call ovito in /Applications/Ovito.app/Contents/MacOS/. Since it is cumbersome to type this everytime I open Ovito, firstly I made its link to the directory where my PATH environment can find. But unfortunately and I don’t know the reason why, it did not work for Ovito.
So I created a script ~/bin/ovito,
After running a VASP simulation with Li, La, Zr, and O, I found a bug in vasprun.xml in which Zr is written as r.
$ grep 'PAW_PBE' vasprun.xml <rc><c> 28</c><c>Li</c><c> 7.01000000</c><c> 1.00000000</c><c> PAW_PBE Li 17Jan2003 </c></rc> <rc><c> 12</c><c>La</c><c> 138.90000000</c><c> 9.00000000</c><c> PAW_PBE La_s 06Sep2000 </c></rc> <rc><c> 8</c><c>r </c><c> 91.22400000</c><c> 12.00000000</c><c> PAW_PBE Zr_sv 04Jan2005 </c></rc> <rc><c> 48</c><c>O </c><c> 16.00000000</c><c> 6.00000000</c><c> PAW_PBE O_s 07Sep2000 </c></rc> So reading the vasprun.xml file with using ASE module or something like that does not work.
Since I got to know that Markdown is available in pelican, I tried to use Markdown.
[TOC]
Markdown setting To activate the Markdown, I wrote the following line in pelicanconf.py.
MD_EXTENSIONS = ['codehilite','extra','smarty', 'toc'] And to make toc to be available in Markdown I added 'extract_toc' as,
PLUGINS = ["tag_cloud","render_math",'extract_toc'] These are what I did. It is easy.
Test This post is written in Markdown, and now I am going to see whether it works or not…
tags: python, emacs, mac When I code python programs using emacs, emacs uses elpy and elpy uses flake8 for syntax checking. But this syntax checking is kind of annoying. For example, I would like to write like this
x = some_func(a,b,c+d) instead of this
x = some_func(a, b, c + d) I think this style condtains too many whitespaces which make code lengthy.
To change the style in flake8, you can write the following lines in ~/.
tags: emacs Sometimes when writing a LaTeX document with Emacs.app in MacOS and I tried to put citation in the document by typing Ctl-C + [, emacs fails to search references I am looking for. I do not know the reason exactly, but I seems that emacs does not store the reference information in it.
So the solution is to reload the reference file by typing M-x Reftex-parse-all. Then emacs will reload bibtex database and reftex by Ctl-C + [ begins to work again, perhaps.
tags: linux I wanted to run jupyter notebook background without showing any outputs from it. So I tried the following command, :
$ jupyter notebook hoge.ipynb 2>&1 > /dev/null & But it still showed some outputs on the screen and interrupted me typing other commands. This is because, 2>&1 means that standard error output goes to where the standard output currently pointing to, which is not /dev/null. So I had to switch the order from 2>&1 > /dev/null to 1>/dev/null 2>&1 to make the error output go to /dev/null.
tags: research, paper, alloy Structure Determination of Mg5Si6 Particles in Al by Dynamic Electron Diffraction Studies, by H. W. Zandbergen, S. J. Andersen, J. Jansen, Science 277 (1997) 1221 精密な実験からbeta''-precipitateの原子構造を解明したという論文.
tags: research, paper, DFT Reproducibility in density functional theory calculations of solids, Kurt Lejaeghere et al., Science 351, issue 6280, aad3000, link 固体材料のDFT計算ツールはたくさんあり,様々な手法のさまざまな実装が存在している. それらの各ツ
tags: language ここ から例文を取ってきて勉強した. カフェでの会話 会話例1 A: Bonjour, qu'est-ce que vous prendrez? B: Qu'est-ce que vous me conseillez? A: Nous utilisons du cafe Illy, donc je vous conseille toutes les boissons à base de café. B: Je vois, alors je prendrai un
tags: linux, mac Here is memorandom of how I set up password manager pass.
Install pass On MacOSX (El Capitan in my case), :
$ brew install pass will install pass command and others that the pass depends on.
Prepare gpg To generate PGP key using GnuPG gpg, :
$ gpg --gen-key You have to answer some questions to generate a pgp key.
Once you generate a pgp key, you can confirm it with --list-keys option as, :
tags: lammps, research Suppose if one creates a dislocation in a system with two surfaces top and bottom on z axis and periodic in x and y axes. Motions of atoms at the top and bottom layer should be limited along x and y direction and not to move z direction. One can achieve this constraint in LAMMPS by writing as follows, :
region top block 0.0 300.0 0.0 20.0 212.
tags: emacs, python PEP check when I open a pyhton code with emacs is so annoying. So I figured out how to disable PEP8 check, and this is how it works.
In the .emacs.d/init.d or appropriate file in your system, python-check-command should be set nil. :
(add-hook 'python-mode-hook '(lambda () (seq python-check-command nil) )) Then you never be bothered by too strict PEP8 checker.
tags: linux, git I made a bash function to replace git archive command, :
function gitarch(){ basedname=$(git rev-parse --show-toplevel) dname=$(basename $basedname) cwd=$(pwd) cd $basedname fname=${dname}_`ymd`.tgz git archive --format=tar --prefix=${dname}/ HEAD | gzip > $fname cp $fname ${cwd}/ cd $cwd } Writing this function in .bashrc file, I can create git archive with name projectname_date.tgz a little bit easier.
BTW, by typing :
$ type gitarch you can see what is this function doing.
tags: fortran Think of a problem finding the substring def in the string abcdefg.
I though Fortran does not have an efficient way of doing this and I have to make own subroutine to achieve this. But Fortran has such a function, index.
See, INDEX -- position of a substring within a string
Its syntax is, :
RESULT = INDEX(STRING, SUBSTRING [, BACK [, KIND]]) and the return value is an integer of the substring position.
tags: python, pelican I updated my blog automation script. This version make blog posting process much more efficient and I am much happier than before.
This version is uploaded on Gist.
gist ryokbys/myblog.py Now I can create a new blog post by typing, :
$ blogpost 'BLOG TITLE' then a blog-post file is created at the apropriate place in the system with the date and title in the filename.
tags: pelican In my case, the images used in the blog post are all uploaded on to flickr and loaded from flickr to show in the post.
Upload the images on flickr Fist you have to have an account on flickr, of course.
Upload a image to be included in a post.
Get the image URL from flickr.
{width=“400px”}
Pressing share photo button or image, from Embed tab as shown in the above picture you can get the embedding HTML source code.
tags: emacs
What is Cask? Usually, without cask, we need to download and install packages manually and write some configurations in .emacs.d/init.el to make them work. Cask makes it much easier.
cask documentation
It seems to require the following conditions,
emacs >= 24 python >= 2.6 Install $ brew install cask It seems different from :
$ pip install cask Setup $ cd ~/.emacs.d $ cask init $ ls Cask $ head Cask (source gnu) (source melpa) (depends-on "bind-key") (depends-on "cask") (depends-on "dash") (depends-on "drag-stuff") (depends-on "exec-path-from-shell") (depends-on "expand-region") (depends-on "f") You can modify this Cask file to manage which packages to be installed?
tags: python, emacs, mac Setup To use ipython/jupyter notebook in Emacs, you need elpy and ein (emacs ipython notebook) packages. So write those dependencies in .emacs.d/Cask file (here I assume that the package management system cask is installed), : (depends-on “ein") (depends-on “elpy”) Usage Boot notebook server At first, ipython/jupyter notebook server should be
tags: linux, shellscript In the previous post, I wrote about an shellscript that store some data in a directory whose name includes date info.
Here I modified it to be able to add an identifier after the date info in the directory name. As shown in the following code, getopts function? is used to receive -i option. After analyzing the options, shift line is necessary, otherwise identifier is also counted as an argument.
tags: fortran, research When I run a program on Linux, I got the following error, :
forrtl: severe (41): insufficient virtual memory This error seems to be clear. As it says, I seem to require too many memory. But when I printed the number of memory I was requiring, it seemed to be not too much, like 1.8GB, for the system having 32GB.
Actually this bug was related to the limit of 4-Byte integer.
tags: research, lammps These days I am learning how to use LAMMPS.
To allow the simulation cell to relax, you need to specify box/relax with fix command as, :
fix 1 all box/relax tri 0.0 Here it mentions that the cell is triclinic, which meams x, y, z, yz, zx, and xy are controlled independently. And final value 0.0 means pressure to be achieved.
Then you minimize the system as, :
tags: mac Sometimes XQuartz windows go somewhere off the screen if you are using multiple monitors.
To bring back the window, you may be able to use wmctrl utility which can be installed as, :
$ brew install wmctrl And you can see XQuartz window list as, :
$ wmctrl -G -l 0x00600008 0 0 44 200 200 N/A Gnuplot It seems the window I am now looking for is at the position (0,0) with width and height (200,200), but it is not seen on the screen.
tags: research, ase There was a bug in ASE package.
When I tried to read a vasprun.xml file using ase.io.read like,
atoms= read('vasprun.xml', index=0, format='vasp-xml') and the vasprun.xml contains some constraints for atoms, I got the following message,
Traceback (most recent call last): File "/Users/kobayashi/src/fitpot/vasprun2fp.py", line 63, in <module> atoms= read('vasprun.xml',index=0,format='vasp-xml') File "/Users/kobayashi/src/ase/ase/io/formats.py", line 290, in read return next(_iread(filename, slice(index, None), format, **kwargs)) File "/Users/kobayashi/src/ase/ase/io/formats.py", line 360, in _iread for dct in io.
tags: research, ase, vasp
On jupyter notebook This is done on jupyter notebook, and it can be read via nbviewer web service. See the link below:
Generating VASP inputs via ASE How to put your jupyter notebook on the web? When you make a jupyter notebook, put it at somewhere public place like Dropbox/Public/. And get the URL of the file and put it in the search box at jupyter nbviewer website.
tags: research, alloy, ase, lammps, python
A bit Math first To get $y$-at%Mg2Si for the 1.2wt%Mg2Si system, calculate the following simultaneous equations,
$$\begin{aligned} \frac{(\text{Mg$_2$Si})_y}{\text{Al}_x +(\text{Mg$_2$Si})_y} &=& 0.012, \ x + y &=& 1, \end{aligned}$$
using masses, Al=26,981, Mg=24.305, and Si=28.085. We get $y\simeq 0.00425$.
In case of 32000-atom system If we put (20,20,20) cubic FCC cells including 4 atoms in the simulation box, the box contains 32,000 atoms. In the 32000-atom system,