This is a read-only mirror of pymolwiki.org
Main Page
Jump to navigation
Jump to search
PyMol Wiki Home
You have reached the (new) home of the PyMolWiki, a user-driven web-oriented CMS.
We (will) strive to provide
- updates on PyMol
- a stable user-oriented documentation base
- a thorough treatment of the PyMol program
- feature rich scripts for general PyMol use
Links of Interest
- Updated! How to get involved! -- read me if you want to add something
- Script Library -- add one!
- PyMol Commands (>130 documented!)
- All Pages
- Plugins
- See All Categories
#############################################################################
# $Id$
#############################################################################
import sys;
import os;
import math;
import re;
import getopt;
from Bio.PDB.PDBParser import PDBParser
import imgWriter
#my imageWriter using GD
#import dali.imageWriter
class point:
"""
point is a simple representation of a 3D point in space
"""
def __init__(self, ray = [] ):
"""
Constructor
"""
if ( len(ray) != 3 ):
print "ERROR: What, so macromolecules are 2-dimensional now? I don't th
ink so."
sys.exit(2)
# assign instance variables
self.x = ray[0]
self.y = ray[1]
self.z = ray[2]
# calculate the length from origin
self.length = math.sqrt( self.x**2 + self.y**2 + self.z**2 )
<npython>
- $Id$
import sys; import os; import math; import re; import getopt;
from Bio.PDB.PDBParser import PDBParser
import imgWriter
- my imageWriter using GD
- import dali.imageWriter
class point:
""" point is a simple representation of a 3D point in space
"""
def __init__(self, ray = [] ): """ Constructor
"""
if ( len(ray) != 3 ): print "ERROR: What, so macromolecules are 2-dimensional now? I don't th
ink so."
sys.exit(2)
# assign instance variables self.x = ray[0] self.y = ray[1] self.z = ray[2]
# calculate the length from origin self.length = math.sqrt( self.x**2 + self.y**2 + self.z**2 )
</npython>