Tuesday, April 17, 2007

Brazil...

working late. Whilst the renders slowly chug away I managed to create a more successful Python script. The script now allows you to enter the path of the pdb file on your HD. It displays the first line that starts with "ATOM". You then enter the X, Y, and Z coordinates as shown in the display of this line. There is simple error detection to make sure what you entered is in the line displayed. Based on your entry the script determines where the X, Y, and Z coordinates appear in each line of the PDB file that starts with "ATOM" and then copies these to a new file. So you end up with just the X, Y, and Z, coordinates of the PDB file in a format which will be easily converted to Houdini's .geo format. the whole point of the script is a way to easily opne PDBs in Houdini. they will appear as a point cloud with each point representing the position of an atom in the molecular structure.

next steps: add proper .geo headers and calculate the numebr of lines in the file. After I've accomplihed this and verified that the file will open up correctly in Houdini, I'll then make a GUI.

long term goal is to add an attribute in the file so that Houdini knows which atom is what in the PDB. then I'd like to have the file contain prioperly scaled sphere primitives and the whole bit so that the you can open up a basic molecular structure in Houdini, all set to mess with. This may take a while as i've got a million things going on. However its fun to tinker with whilst rendering.

...where the Amazon flows, we'll be saying "hello", and "fancy meeting you here!"

0 Comments:

Post a Comment

<< Home