Skip to content

Instantly share code, notes, and snippets.

View unkcpz's full-sized avatar

Jusong Yu unkcpz

  • Swiss
View GitHub Profile
@unkcpz
unkcpz / pw_run.py
Last active March 31, 2016 02:27
Aiida: template of single run. not workflows.
#!/usr/bin/env runaiida
# -*- conding: utf-8 -*-
__copyright__ = u"Copyright (c), 2015, ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE (Theory and Simulation of Materials (THEOS) and National Centre for Computational Design and Discovery of Novel Materials (NCCR MARVEL)), Switzerland and ROBERT BOSCH LLC, USA. All rights reserved."
__license__ = "MIT license, see LICENSE.txt file"
__version__ = "0.5.0"
__contributors__ = "Andrea Cepellotti, Giovanni Pizzi, Martin Uhrin, Nicolas Mounet, Riccardo Sabatini, Valentin Bersier"
# example:
# user$ ./pw_energy.py pw53s@rocks PbO.cif lda_hgh
@unkcpz
unkcpz / wf_ppcutoff.py
Last active April 6, 2016 08:42
aiida's workflow for ecutwfc test of pseudopotential.
# -*- coding: utf-8 -*-
from __future__ import division
import aiida.common
from aiida.common import aiidalogger
from aiida.orm.workflow import Workflow
from aiida.orm import Code, Computer
from aiida.orm import CalculationFactory, DataFactory
__copyright__ = u"Copyright (c), 2015, ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE (Theory and Simulation of Materials (THEOS) and National Centre for Computational Design and Discovery of Novel Materials (NCCR MARVEL)), Switzerland and ROBERT BOSCH LLC, USA. All rights reserved."
__license__ = "MIT license, see LICENSE.txt file"
@unkcpz
unkcpz / BLKconv.pl
Last active August 9, 2016 02:01
auto script for epsilon.x and yambo-preload calculation.
#!/usr/bin/env perl
##
## convge test for parameter NGsBlkXd from 50..250
$NAME = "zns-z";
@n = (50,100,150,200,250);
foreach $blk (@n){
# loop write the input yambo
open INFILE, ">yambo.in" or die $!;
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="font">
<edit name="autohint">
<bool>true</bool>
</edit>
<edit name="hintstyle">
<const>hintfull</const>
@unkcpz
unkcpz / tmux.conf
Created June 20, 2017 14:34
config file of tmux
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
@unkcpz
unkcpz / commands
Last active September 6, 2017 00:55
Tianhe 2 quick commands
# 拷贝高通量运行
mkdir str && find ./ -type f | xargs -I {} mv {} str ; cp ~/BIGDATA/jsy/scripts/batch_files/slurm.sh ./ && yhbatch -n 24 -N 1 -p paratera slurm.sh
# 查找当前文件夹下一层内所有文件夹
DIRS=$(find ./ -maxdepth 1 -type d -name "vasp_tmp*")
# 拷贝并按ID重命名
for dir in $FILES; do suffix=$(echo $dir | awk -F'_' '{print $3}'); cp $dir/relax/CONTCAR.relax.gz relaxed/POSCAR_$suffix.gz; done
My Laboratory at scut
Good Moning, I will talk about my laboratory at Physical Institute.
Our group study the properties and the electronic structures of the materials by using the
supercomputers. Without synthesizing the materials, we can calculate the properties of materails and study
the mechenism of some subtle phenominals interreacte with materails.
My work at present is to write and maintain a software used by my collegues. Therefore I am much like
a programmer that I coding, debuging and commiting the changes.
I like my work very much, because I notice most scientist study in physics and chemistry can not write
clear and useful code, meanwhile programmers can hardly get the knowleage from the scientist.
@unkcpz
unkcpz / oral e hw 2
Last active December 11, 2017 12:57
good morning everyone
my topic today is second harmonic generation in noncentrosymmetric phosphates
second harmonic generation is the measurable property of nonlinear optical materials;
and noncentrosymmetric phosphates
is a good ultraviolet nonlinear optical material.
first i'll give you the backgroud of nonlinear optical materials:
nonlinear optical materials can converting the incident light into other frequency.
it is important in laser optical science and important military applications.
import numpy as np
#
# Delaunay reduction (originally from phonopy)
#
def get_Delaunay_reduction(lattice, tolerance):
extended_bases = np.zeros((4, 3), dtype=float)
extended_bases[:3,:] = np.transpose(lattice)
extended_bases[3] = -np.sum(lattice, axis=1)
@unkcpz
unkcpz / intel-compiler-2017update7
Last active May 18, 2018 06:32
modulefile-ohpc
#%Module######################################################################
##
## intel compiler modulefile
##
proc ModulesHelp { } {
puts stderr "Sets up the paths you need to use intel compilers."
puts stderr "If this module files doesn't work well , U can try: ."
puts stderr "source /opt/ohpc/pub/apps/intel/parallel_studio_xe_2017_update7/bin/compilervars.sh intel64"
puts stderr "If this command couldn't work as well , connect our technical support staff"
}