1 VisBAR edu H 2 O.....

Similar documents
,,,,., C Java,,.,,.,., ,,.,, i

Python Speed Learning


1 2 3

20 No. 35 (2014) 2013 Excel Excel Excel Excel a 1

たのしいプログラミング Pythonではじめよう!

̤Äê

Python2 Python3 Python 2.7 Python 3.6 Python2 Python3 Python 2.7 Python3.6 Python Python Anaconda Python Anaconda Python

Introduction Purpose This training course demonstrates the use of the High-performance Embedded Workshop (HEW), a key tool for developing software for

X Window System X X &

スライド タイトルなし

Virtual Window System Virtual Window System Virtual Window System Virtual Window System Virtual Window System Virtual Window System Social Networking

コンピュータ概論

AtCoder Regular Contest 073 Editorial Kohei Morita(yosupo) A: Shiritori if python3 a, b, c = input().split() if a[len(a)-1] == b[0] and b[len(

Studies of Foot Form for Footwear Design (Part 9) : Characteristics of the Foot Form of Young and Elder Women Based on their Sizes of Ball Joint Girth

1. Database&Logic Word/Excel/PPT/PDF&Web Ultimate Dictionary 4. Jukkou&Rewrite 5. Convenience&Safety 6. Chinese&Korean 7. Support&Consultation 8

com.ibm.etools.egl.jsfsearch.tutorial.doc.ps


(pack ) Toplevel

fx-9860G Manager PLUS_J

New version (2.15.1) of Specview is now available Dismiss Windows Specview.bat set spv= Specview set jhome= JAVA (C:\Program Files\Java\jre<version>\

0720

23 Study on Generation of Sudoku Problems with Fewer Clues

TH-42PAS10 TH-37PAS10 TQBA0286

13 Student Software TI-Nspire CX CAS TI Web TI-Nspire CX CAS Student Software ( ) 1 Student Software 37 Student Software Nspire Nspire Nspir

LC304_manual.ai

1 I EViews View Proc Freeze

II III I ~ 2 ~

中堅中小企業向け秘密保持マニュアル


PR映画-1

- 2 -



1 (1) (2)

Python Speed Learning

28 Horizontal angle correction using straight line detection in an equirectangular image

32C2100操作編ブック.indb

1 1 tf-idf tf-idf i

1) K. J. Laidler, "Reaction Kinetics", Vol. II, Pergamon Press, New York (1963) Chap. 1 ; P. G. Ashmore, "Catalysis and Inhibition of Chemical Reactio

dTVIIman.PDF

(VKIR) VKIR VKIR DCT (R) (G) (B) Ward DCT i

2006 [3] Scratch Squeak PEN [4] PenFlowchart 2 3 PenFlowchart 4 PenFlowchart PEN xdncl PEN [5] PEN xdncl DNCL 1 1 [6] 1 PEN Fig. 1 The PEN

Ver.1 1/17/2003 2

1,a) 1,b) TUBSTAP TUBSTAP Offering New Benchmark Maps for Turn Based Strategy Game Tomihiro Kimura 1,a) Kokolo Ikeda 1,b) Abstract: Tsume-shogi and Ts

kut-paper-template.dvi

n 2 n (Dynamic Programming : DP) (Genetic Algorithm : GA) 2 i

An Interactive Visualization System of Human Network for Multi-User Hiroki Akehata 11N F

熊本大学学術リポジトリ Kumamoto University Repositor Title 特別支援を要する児童生徒を対象としたタブレット端末 における操作ボタンの最適寸法 Author(s) 竹財, 大輝 ; 塚本, 光夫 Citation 日本産業技術教育学会九州支部論文集, 23: 61-

Tiny Basic for Windows 2 1 Tiny Basic for Windows Tiny Basic for Windows tbasic tbasic BASIC BASIC Visual Basic BASIC BASIC BASIC tbasic Help BASIC tb

超初心者用

24 Region-Based Image Retrieval using Fuzzy Clustering

A pp CALL College Life CD-ROM Development of CD-ROM English Teaching Materials, College Life Series, for Improving English Communica

2017 (413812)

Web Web Web Web Web, i

25 II :30 16:00 (1),. Do not open this problem booklet until the start of the examination is announced. (2) 3.. Answer the following 3 proble

28 Docker Design and Implementation of Program Evaluation System Using Docker Virtualized Environment

0.2 Button TextBox: menu tab 2

2 3

Supplement for the Basic Operation manual

fiš„v3.dvi

FTDI Driver Error and Recovery Procedure Check FTDI driver operation Rev :OK, Rev :NG, Rev :NG May 11, 2017 CHECK FTDI DRIVER

<4D F736F F D B B83578B6594BB2D834A836F815B82D082C88C60202E646F63>

ron.dvi

2

WebGL OpenGL GLSL Kageyama (Kobe Univ.) Visualization / 57

RR-US470 (RQCA1588).indd

Windows Cygwin Mac *1 Emacs Ruby ( ) 1 Cygwin Bash Cygwin Windows Cygwin Cygwin Mac 1 Mac 1.2 *2 ls *3 *1 OS Linux *2 *3 Enter ( ) 2

TITLE

OS Windows Mac OS Windows Mac OS Windows XP Mac OS X OS Windows 95 Mac OS

*Ł\”ƒ‚ä(DCH800)

Specview Specview Specview STSCI(Space Telescope SCience Institute) VO Specview Web page htt

PowerPoint Presentation

untitled

SURF,,., 55%,.,., SURF(Speeded Up Robust Features), 4 (,,, ), SURF.,, 84%, 96%, 28%, 32%.,,,. SURF, i

Microsoft Word - MetaFluor70取扱説明.doc

from tkinter import * root = Tk() # variable teban = IntVar() teban.set(1) # def start(): canvas.create_rectangle(0, 0, 560, 560, fill= white ) for k

memo ii

-2-

GNU Emacs GNU Emacs

kut-paper-template2.dvi

3 Powered by mod_perl, Apache & MySQL use Item; my $item = Item->new( id => 1, name => ' ', price => 1200,

listings-ext

作業手順手引き

21 Effects of background stimuli by changing speed color matching color stimulus

Baobab ツール・作業紹介資料1.4

52-2.indb


slide

FC741E2_091201

本文6(599) (Page 601)

Microarray Data Analysis Tool Ver3.0 Manual.doc

ii II Web Web HTML CSS PHP MySQL Web Web CSS JavaScript Web SQL Web

Microsoft Word - PrivateAccess_UM.docx

RT-PCR プロトコール.PDF

評論・社会科学 84号(よこ)(P)/3.金子

Cleaner XL 1.5 クイックインストールガイド

総合的な経済・エネルギー・環境分析に資する技術情報の整備のための研究


Transcription:

VisBAR edu v1.03 ( ) 25 4 22

1 VisBAR edu 1 1.1....................................................... 1 1.2.................................................. 2 2 3 2.1 H 2 O......................................... 3 2.2.................................................. 5 2.2.1 (xyz )................................... 5 2.2.2 (txt ).................................. 5 2.3 C 60............................................ 7 2.4....................................... 8 3 10 3.1....................................................... 10 3.1.1 Python................................................. 10 3.1.2 vpython................................................. 10 3.2.................................................. 12 3.2.1................................................... 12 3.2.2..................................... 12 A README 14 A.1 (00README FIRST JP.txt)............................... 14 A.2 (00README FIRST EN.txt)................................ 14 B 15 i

1.1 VisBAR edu(v.1.02).................................. 1 2.1 (H 2 O)0...................................... 4 2.2 (H 2 O)5...................................... 4 2.3.............................................. 6 2.4 C 60 0.......................................... 7 2.5 C 60 5.......................................... 7 2.6...................................................... 8 2.7............................................. 8 2.8............................................. 9 2.9 ( ) ( )......................... 9 3.1............................................ 11 ii

iii

1 VisBAR edu 1.1 VisBAR edu Python ( ) 100 1.1 VisBAR (=Visualization tool with Ball, Arrow and Rod) 1 README ( A) windows python 3D Vpython xyz xyz X step number X 1.1: VisBAR edu(v.1.02) 1 T. Hoshi, Y. Akiyama, T. Tanaka and T. Ohno, Ten-million-atom electronic structure calculations on the K computer with a massively parallel order-n theory, J. Phys. Soc. Jpn. 82, 023710, 4pp (2013). (http://dx.doi.org/10.7566/jpsj.82.023710);, (2011);, (2012). 1

1.2 1. python 2 python ver2.6 2. python print hello hello 3. Vpython 3 Vpython (python ver2.6 ) 4. from visual import * ball = sphere(pos=(0.,0.,0.) Vpython 5. zip 2 http://python.org/ 3 http://vpython.org/ 2

2 2.1 H 2 O H2O position.xyz H2O bond.txt 1. VisBAR edu.v1.03.py EDIT with IDLE Run Module 2. H2O position.xyz 3. c 4. 5 5. y 6. H2O bond.txt 7. 0 2.1 8. 2.1 2.3 2.3 3

2.1: (H 2 O)0 2.2: (H 2 O)5 4

2.2 H 2 O 2.2.1 (xyz ) xyz 3 H2O mdstep= 0 O 0.000000000000000E+00 0.000000000000000E+00 0.000000000000000E+00 H 0.584410971000000E+00 0.761619206000000E+00 0.000000000000000E+00 H 0.584410971000000E+00-0.761619206000000E+00 0.000000000000000E+00 3 H2O mdstep= 10 O 0.302436079891157E-02-0.475933184739195E-02-0.984232411435636E-02 H 0.469278370524129E+00 0.855231752151677E+00 0.363221202155044E-02 H 0.651153798693286E+00-0.779082442593406E+00 0.153844973808151E+00 3 H2O mdstep= 20 O 0.793786824770438E-02-0.147618136821455E-01-0.232167336225697E-01 H 0.341380631093269E+00 0.966937003449631E+00 0.239467484992550E-01 H 0.700435418943461E+00-0.730747984535303E+00 0.347520989461861E+00 xyz 1. 2. ( mdstep= 3. 4. ( ) x y z 2.2.2 (txt ) 1 4 2 1 3 1 5

1 2 1 3 4 1,2,3... 2 1 2.3: 6

2.3 C 60 C60 position.xyz C60 bond.txt 2.4: C 60 0 2.5: C 60 5 7

2.4 2.7 2.8 2.6: 2.7: 8

2.8: 2.2.1 2.2.2 2.9: ( ) ( ) (-1,0,0) 2 9

3 3.1 Python Vpython 3.1.1 Python Python ( ) Python ( ) PC f = open("sample.txt","r") line = f.readline() while line: line = f.readline() if line.find("check") >= 0: print line break f.cloce() sample.txt check Python python ( ) 3.1.2 vpython Vpython Python 3D Vpython - - from visual import * ball = sphere( pos = (0.,0.,0.), radius = 0.5, color = (0., 0., 1.)) 10

3.1 1 Vpython 2 (0,0,0) 0.5 RGB 3.1: 11

3.2 3.2.1 import visual as Vp Vpython Vp Vp. Vpython raw input() filename = raw_input("input:file_name=") Input:filename= filename h=open(filename, r ) h.close() xyz scene = Vp.display(title="%s"%filename, width=800, height=800, background=(0.8,0.8,0.8)) window window 800x800 (0.8,0.8,0.8) for i in range(len(allion)): for j in range(len(allion[0])): ionball=vp.sphere(frame=viewobject,pos=(allion[i][j][1],allion[i][j][2],allion[i][j][3]), radius=0.35) if bond select == y : rod = Vp.cylinder (frame=viewobject,pos=ballposition ini, axis=ballposition bin, radius=0.05, color=(1,0.5,0)) 3.2.2 46 ionball=vp.sphere(frame=viewobject,pos=(allion[i][j][1],allion[i][j][2],allion[i][j][3]), radius=0.35) radius=0.35 2 ionball=vp.sphere(frame=viewobject,pos=(allion[i][j][1],allion[i][j][2],allion[i][j][3]), radius= 0.7) 46 color=(0.,0.5,1.) ionball=vp.sphere(frame=viewobject,pos=(allion[i][j][1],allion[i][j][2],allion[i][j][3]), radius= 0.7,color=(0.,0.,1.)) RGB red,green,blue 1 RGB Web 12

59 74 rod = Vp.cylinder (frame=viewobject,pos=ballposition ini, axis=ballposition bin, radius=0.05, color=(1,0.5,0)) radius=0.05 59 74 rod = Vp.cylinder (frame=viewobject,pos=ballposition ini, axis=ballposition bin, radius=0.05, color=(1,0.5,0)) color=(0.5,1.,0.) window window 39 scene = Vp.display(title="%s"%filename, width=800, height=800, background=(0.8,0.8,0.8)) width=800,height=800 window scene = Vp.display(title="%s"%filename, width=400, height=400, background=(0.8,0.8,0.8)) width height window 39 scene = Vp.display(title="%s"%filename, width=400, height=400, background=(0.8,0.8,0.8)) background=(0.8,0.8,0.8) RGB background=(1.,1.,1.) background=(0.,0.,0.) 44 Vp.label(frame=viewobject,x=10,y=10, text= step number: %1i % (i)) x=10,y=10 x=10,y=10 x,y color,linecolor RGB Vp.label(frame=viewobject,x=10,y=10,color=(1.,0.,0.),linecolor=(0.,0.,0.), text= step number: %1i % (i)) 13

A README A.1 (00README FIRST JP.txt) VisBAR edu Python VisBAR edu VisBAR [1] VisBAR edu [1] (VisBAR edu manual jp.pdf) [1] Takeo Hoshi, Yohei Akiyama, Tatsunori Tanaka and Takahisa Ohno, Ten-million-atom electronic structure calculations on the K computer with a massively parallel order-n theory, J. Phys. Soc. Jpn. 82, 023710, 4pp (2013). http://dx.doi.org/10.7566/jpsj.82.023710 A.2 (00README FIRST EN.txt) VisBAR edu is a python-based visualization tool for education. VisBAR edu is a part of the package of VisBAR [1]. If you use VisBAR edu in a publication, please cite the paper [1]. Details are explained in the attached japanase manual (VisBAR edu manual jp.pdf). An english manual is in preparation. [1] Takeo Hoshi, Yohei Akiyama, Tatsunori Tanaka and Takahisa Ohno, Ten-million-atom electronic structure calculations on the K computer with a massively parallel order-n theory, J. Phys. Soc. Jpn. 82, 023710, 4pp (2013). http://dx.doi.org/10.7566/jpsj.82.023710 14

B B.1: VisBAR edu v1.03 1 # coding: cp932 2 import visual as Vp 3 import re 4 print "##################################################" 5 print "# Start VisBAR_edu.v1.03.py #" 6 print "# Apr 18, 2012 #" 7 print "##################################################" 8 filename = raw input("input:file_name=") 9 move type = raw input("input:[animation:a, picture:s, frame by fram:c]=") 10 move limit = raw input("input:max_step=") 11 bond select = raw input("[input bond_list_file:y, no bond list:n]=") 12 if bond select == "y": 13 bondlist = raw input("input:bond_list_name=") 14 bond = open(bondlist,"r") 15 h=open(filename,"r") 16 ions=[] 17 allion=[] 18 line = h.readline() 19 while line: 20 line=h.readline() 21 if line.find("mdstep")>=0: 22 while 1: 23 ion = h.readline() 24 ion =ion.strip() 25 ion = re.sub(" *"," ",ion) 26 ion = re.split(" ",ion) 27 if len(ion)<4 or [ion]==[ ]: 28 break 29 line =[] 30 else: 31 for x in range(3): 32 ion[x+1]=float(ion[x+1]) 33 ions += [ion] 34 allion += [ions] 35 ions=[] 36 if [line]==[ ]: 37 break 38 h.close() 39 scene = Vp.display(title="%s"%filename, width=800, height=800, background=(0.8,0.8,0.8)) 40 viewobject=vp.frame() 41 for i in range(len(allion)): 42 if move type == "s": 43 i =int(move limit) 44 Vp.label(frame=viewobject,x=10,y=10, text= step number: %1i % (i)) 45 for j in range(len(allion[0])): 46 ionball=vp.sphere(frame=viewobject,pos=(allion[i][j][1],allion[i][j][2],allion[i][j][3]), radius=0.35) 47 48 if bond select == "y": 49 line = bond.readline() 50 if line =="": 51 for items in sub items: 52 ballposition ini = [float(allion[i][int(items[0]) 1][1]), 53 float(allion[i][int(items[0]) 1][2]), 54 float(allion[i][int(items[0]) 1][3])] 55 ballposition ter = [float(allion[i][int(items[1]) 1][1]), 56 float(allion[i][int(items[1]) 1][2]), 57 float(allion[i][int(items[1]) 1][3])] 58 ballposition bin = [ballposition ter[k] ballposition ini[k] for k in range(len(ballposition ter))] 15

59 rod = Vp.cylinder (frame=viewobject,pos=ballposition ini, axis=ballposition bin, radius=0.05, color =(1,0.5,0)) 60 else: 61 sub items = [] 62 items = line.split() 63 for line in range(int(items[1])): 64 line = bond.readline() 65 items = line.split() 66 sub items +=[items] 67 ballposition ini = [float(allion[i][int(items[0]) 1][1]), 68 float(allion[i][int(items[0]) 1][2]), 69 float(allion[i][int(items[0]) 1][3])] 70 ballposition ter = [float(allion[i][int(items[1]) 1][1]), 71 float(allion[i][int(items[1]) 1][2]), 72 float(allion[i][int(items[1]) 1][3])] 73 ballposition bin = [ballposition ter[k] ballposition ini[k] for k in range(len(ballposition ter))] 74 rod = Vp.cylinder (frame=viewobject,pos=ballposition ini, axis=ballposition bin, radius=0.05, color =(1,0.5,0)) 75 if j==len(allion[0]) 1: 76 if i==len(allion) 1 or i==int(move limit): 77 break 78 Vp.rate(5) 79 if i == 0 or move type == "c": 80 raw input("[push any key]") 81 for obj in viewobject.objects: 82 obj.visible=0 83 if move type == "s" or i == int(move limit): 84 break 85 raw input("end program [push any key]") 86 for obj in viewobject.objects: 87 obj.visible=0 88 scene.visible = 0 89 bond.close() 16