Confused with distances

This is a discussion on "Confused with distances" within the Other Programming Languages section. This forum, and the thread "Confused with distances are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Other Programming Languages

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Mar 23rd, 2006, 17:08
Up'n'Coming Member
Join Date: Sep 2005
Location: athens
Age: 25
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Confused with distances

Hello all,
I have a school assignment in Biology but I seem to be unable to begin...
What I was given is something like the following :


HELIX1: x y z
A 1 -1.115 8.537 7.075
B 2 -2.745 5.280 7.165
C 3 -0.777 3.267 7.329
D 4 1.610 5.225 10.885
E 5 0.296 5.263 10.912

HELIX2:
K 1 -0.696 13.041 22.357
L 2 1.152 11.081 23.082
M 3 2.200 17.590 18.424

What I must do is :
take each atom from each helix (for example atoms A, B, C, D, E from helix1 , atoms K,L,M from helix2)
and calculate the distance from all other atoms of the remaining helices.
An example :
1) Take atom A from helix1
2) Calculate distance with atom K from helix2
3) Calculate distance with atom L from helix2
4) Calculate distance with atom M from helix2

In order to calculate the distance ,for example, between A(helix1) and K(helix2), I use the formula:
distance = (Xa-Xk)^2 + (Ya-Yk)^2 + (Za-Zk)^2

So, what I need to store is :
x,y,z for each atom
then, using the formula above ,I will calculate the distance...
I don't know if I need a hash of arrays, an array of hashes or something more or less complicated...
Any help?
Reply With Quote

Reply

Tags
confused, distances

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Still confused... PHP ssnerdy Starting Out 14 Oct 1st, 2007 10:29
Now im really confused cressy Scripts and Online Services 1 Aug 4th, 2007 08:14
Confused $_SESSION SoulAssassin PHP Forum 2 May 18th, 2007 14:44
Confused!!! TwentyFourSeven Website Planning 2 Apr 28th, 2007 05:57
Confused wanna be, need much help Helpless Web Page Design 1 Nov 30th, 2006 04:00


All times are GMT. The time now is 00:07.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43