C C BASIC: Interatomics Distance Measurement C REAL CA(3), CB(3), DIST

Download Presentation

C C BASIC: Interatomics Distance Measurement C REAL CA(3), CB(3), DIST

Loading in 2 Seconds...

- 52 Views
- Uploaded on
- Presentation posted in: General

C C BASIC: Interatomics Distance Measurement C REAL CA(3), CB(3), DIST

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

File Folder at CBB: /pub/FOR/

dist1.f

C

C BASIC: Interatomics Distance Measurement

C

REAL CA(3), CB(3), DIST

C------------------------------------

READ(*,*) (CA(J),J=1,3)

READ(*,*) (CB(J),J=1,3)

C-----------------------------------------

DIST=SQRT((CA(1)-CB(1))**2 + (CA(2)

1 -CB(2))**2 + (CA(3)-CB(3))**2 )

C-----------------------------------------

WRITE(*,102) DIST

02 FORMAT(' DISTANCE IS = ',3X,F10.3)

STOP

END

A

B

dist2.f

C------------------------------------

C 2D ARRAY

C------------------------------------

REAL CA(3), CB(1000,3), DIST

NATOM=100

C------------------------------------

READ(*,*) (CA(J),J=1,3)

C----------------------------------------

DO I=1,NATOM

READ(*,*) (CB(I,J),J=1,3)

ENDDO

C-----------------------------------------

DO I=1,NATOM

DIST=SQRT((CA(1)-CB(I,1))**2 + (CA(2)

1 -CB(I,2))**2 + (CA(3)-CB(I,3))**2 )

WRITE(*,102) I, DIST

ENDDO

102 FORMAT(I5,3X,F10.3)

STOP

END

B1

A

B2

B3

B4

.

.

.

dist3.f

C------------------------------------

C FILE HANDLING

C------------------------------------

REAL CA(3), CB(1000,3), DIST

NATOM=100

OPEN(Unit=10,File='dist3.inp',Status='Old')

READ(10,*) (CA(J),J=1,3)

DO I=1,NATOM

READ(10,*) (CB(I,J),J=1,3)

ENDDO

CLOSE(Unit=10)

OPEN(Unit=11,File='dist3.out', Status='New')

DO I=1,NATOM

DIST=SQRT((CA(1)-CB(I,1))**2 + (CA(2)

1 -CB(I,2))**2 + (CA(3)-CB(I,3))**2 )

WRITE(11,91) I, DIST

ENDDO

CLOSE(Unit=11)

B1

A

B2

B3

B4

.

.

.

Here is the files you need: /pub/FOR/QUIZ

1opf.pdb porin ompF protein PDB file (340 Amino acids)

all.inp 2627 all atom coordinates

(To copy to your working folder: cp /pub/FOR/QUIZ/*.* . (enter))

Q) Program to measure interatomic distances from Asp113:OD1 atom to all the

rest atoms. And find the atom which exists at the longest distance from the

atom. Use the following requirements:

1) Use ‘File handling method’ for INPUT and OUTPUT files

2) Use ‘IF’ statement to find the longest distance

Email the result and your FORTRAN program to kwlee@bio.gnu.ac.kr

up to the next class time.