This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ..or v *= 5 To use the Vector class, make sure the file Vector.py is somewhere where your python system can find it (such as the directory your own Python scripts are run from). You will need the following lines at the beginning of your script to be able to use "Vectors" and common trig functions: from math import * from Vector import Vector The input file you will need to parse may have an arbitrary number of atoms to build. Each atom after the first three (which you built in HW6) will have a bond length (l34), followed by a bond angle (a234), followed by a dihedral angle (d1234). You can expect these to be in the correct order (lxx,axxx,d,xxxx), and if your input file deviates from this format print an error message and exit. (Hint: you can expect the l-a-d info for each atom to occur in the order the atoms will be built in, so you don't need a very sophisticated input function)....
View Full Document
- Spring '06