Skip to content
nim-hrkn edited this page Nov 9, 2016 · 14 revisions

Welcome to the find_wy wiki!

installation

Download TSPACE

 TSPACE web site is http://aquarius.mp.es.osaka-u.ac.jp/~tspace/

tsp98.f and prmtsp.f are necessary.

'm_tspace' is necessary! Download it as

git clone git@github.com:nim-hrkn/m_tspace.git.

Download find_wy and change make.inc and 'make'

Note

  1. . You must make the same compiler as that used in m_tspace.
  2. . 'ifort -assume realloc_lhs' if you use ifort.

How to run

./find_wy cif_sample/input_y2co17.txt

動作

  1. .原子数が多い場合はrandom searchを行う。(defaultでは最大1000回)
  2. .原子数が少ない場合は全探索して一つ選択する。
内部で自動的に切り替える。

input

inputfile = input_si2o4.txt
nspecies 2
species_name Si O
species_num 4 8
spacegroup 143
originchoice 1

a 10.
b 11.
c 12.
cosa 0
cosb 0
cosc 0

#selectone true     ! true|false  OBSOLETE
randomseed auto    ! auto|integer , autoはclockからrandomseedを作成

 latinfo_only  false   ! false|true  <--  LAT.jsonを出力して終了。

格子の情報だけを得たい場合は

 latinfo_only true

その他の情報も得たい場合は

 latinfo_only false

として呼ぶ。

python interface

Note that they accepts python2 and python3.

library = find_wy.py

You must set the FIND_WY enviromental variable to call find_wy, e.g.,

 $ export FIND_WY=/home/kino/tmp/test_env/find_wy/find_wy

sample main = find_wy_main.py

        fw=find_wy.find_wy(143) # <--- Change this number if you want to use another spacegroup
        lat=fw.lat_info()
        print lat

        #set seed if you want to make the same series of random numbers to make lat 
        seed=100
        np.random.seed(seed)

        a,b,c,alpha,beta,gamma = set_lat(lat) 

        species_name=["Si", "O"] # <--- YOu must define.
        species_num=[4, 8] # <--- you must define
                
        print a,b,c,alpha,beta,gamma,species_name,species_num
        rskel,r=fw.get_positions( a,b,c,alpha,beta,gamma,species_name,species_num ,randomseed=seed)
        print  rskel
        print r
$  ./py/find_wy_main.py 
\rm -rf /home/kino/tmp/test_env/find_wy/execc78691385d3b2569c3a600fab7527450
{u'a': u'0', u'c': u'0', u'b': u'a', u'beta': 90, u'gamma': 60, u'spacegroupid': 143, u'alpha': 90, u'Z': 1, u'originchoide': 1}
5.43404941791 5.43404941791 3.34043262113 90 90 60 ['Si', 'O'] [4, 8]
['species_num 4 8 \n', 'species_name Si O \n', 'cosb 6.12323399574e-17 \n', 'cosa 6.12323399574e-17 \n', 'orginchoice 1 \n', 'cosc 0.5 \n', 'a 5.43404941791 \n', 'c 3.34043262113 \n', 'b 5.43404941791 \n', 'randomseed 100 \n', 'nspecies 2 \n', 'spacegroup 143 \n']
\rm -rf /home/kino/tmp/test_env/find_wy/exec5404688f55d9111fcf55786a30212279
{u'spacegroupid': 143, u'lat': [5.43404941791, 5.43404941791, 3.34043262113, 90.0, 90.0, 120.0], u'atoms': [{u'name': u'Si', u'num_uniqvar': 1, u'add': [0.0, 0.0, 0.0], u'mul': 1, u'wy': u'a', u'xyzch': [u'0', u'0', u'z']}, {u'name': u'Si', u'num_uniqvar': 3, u'add': [0.0, 0.0, 0.0], u'mul': 3, u'wy': u'd', u'xyzch': [u'x', u'y', u'z']}, {u'name': u'O', u'num_uniqvar': 1, u'add': [0.333333333333333, 0.666666666666667, 0.0], u'mul': 1, u'wy': u'b', u'xyzch': [u'0', u'0', u'z']}, {u'name': u'O', u'num_uniqvar': 3, u'add': [0.0, 0.0, 0.0], u'mul': 3, u'wy': u'd', u'xyzch': [u'x', u'y', u'z']}, {u'name': u'O', u'num_uniqvar': 1, u'add': [0.0, 0.0, 0.0], u'mul': 1, u'wy': u'a', u'xyzch': [u'0', u'0', u'z']}, {u'name': u'O', u'num_uniqvar': 3, u'add': [0.0, 0.0, 0.0], u'mul': 3, u'wy': u'd', u'xyzch': [u'x', u'y', u'z']}], u'originchoice': 1}
{u'spacegroupid': 143, u'lat': [5.43404941791, 5.43404941791, 3.34043262113, 90.0, 90.0, 120.0], u'atoms': [{u'num_uniqvar': 1, u'mul': 1, u'frac': [0.0, 0.0, 0.04971772349719251], u'name': u'Si', u'wy': u'a'}, {u'num_uniqvar': 3, u'mul': 3, u'frac': [0.908189377373128, 0.09765859753870422, 0.04031338096905369], u'name': u'Si', u'wy': u'd'}, {u'num_uniqvar': 1, u'mul': 1, u'frac': [0.333333333333333, 0.666666666666667, 0.92645174765419], u'name': u'O', u'wy': u'b'}, {u'num_uniqvar': 3, u'mul': 3, u'frac': [0.07564077406631106, 0.911789607956127, 0.09182217661518818], u'name': u'O', u'wy': u'd'}, {u'num_uniqvar': 1, u'mul': 1, u'frac': [0.0, 0.0, 0.121077706707457], u'name': u'O', u'wy': u'a'}, {u'num_uniqvar': 3, u'mul': 3, u'frac': [0.994574503292715, 0.778250349290332, 0.01966502222769279], u'name': u'O', u'wy': u'd'}], u'originchoice': 1}

read_pos_wy_skel.py

First run find_wy to have the file, POS_WY_SKEL.json
$ ./py/read_pos_wy_skel.py POS_WY_SKEL.json
original description
Si [u'0', u'0', u'z'] [0.0, 0.0, 0.0]
Si [u'0', u'0', u'z'] [0.333333333333333, 0.666666666666667, 0.0]
Si [u'0', u'0', u'z'] [0.666666666666667, 0.333333333333333, 0.0]
Si [u'0', u'0', u'z'] [0.666666666666667, 0.333333333333333, 0.0]
O [u'0', u'0', u'z'] [0.0, 0.0, 0.0]
O [u'0', u'0', u'z'] [0.666666666666667, 0.333333333333333, 0.0]
O [u'0', u'0', u'z'] [0.0, 0.0, 0.0]
O [u'0', u'0', u'z'] [0.666666666666667, 0.333333333333333, 0.0]
O [u'0', u'0', u'z'] [0.333333333333333, 0.666666666666667, 0.0]
O [u'x', u'y', u'z'] [0.0, 0.0, 0.0]
conversion
Si [ 0.          0.          0.88327668]
Si [ 0.33333333  0.66666667  0.89893586]
Si [ 0.66666667  0.33333333  0.03264738]
Si [ 0.66666667  0.33333333  0.4249024 ]
O [ 0.          0.          0.51770598]
O [ 0.66666667  0.33333333  0.63373223]
O [ 0.          0.          0.90542048]
O [ 0.66666667  0.33333333  0.03209262]
O [ 0.33333333  0.66666667  0.27208314]
O [ 0.78311704  0.66579814  0.37302571]

./py/ase_crystal_from_json.py

$ ./py/ase_crystal_from_json.py POS_WY.json
summary
Si [  2.96008865e-16   5.12702393e-16   4.83419162e+00]
Si [ -3.24826161e-15   5.77350269e+00   4.97207966e+00]
Si [ 5.          2.88675135  1.27286323]
Si [ 5.          2.88675135  0.70980008]
O [  6.80319089e-16   1.17834723e-15   1.11104539e+01]
O [ 5.          2.88675135  5.68814455]
O [  5.46793586e-16   9.47074273e-16   8.92981693e+00]
O [ 5.          2.88675135  6.47742627]
O [ -3.11272013e-15   5.77350269e+00   7.18564001e+00]
O [ -4.74573897   8.31062624  10.69527758]
O [  0.17565605   0.39501041  10.69527758]
O [  4.57008293   8.61487143  10.69527758]
POSCAR.ase  is made. for  vasp
POS.new.json  is made. for  json

py/crystal_from_pos_wy_skel_all.py

$ ./py/crystal_from_pos_wy_skel_all.py POS_WY_SKEL_ALL.json
POSCAR.new is made.
It reads POS_WY_SKEL_ALL.json, which is one of the output files of find_wy, and supply (x,y,z) to give numerical coordinates.