Main Page: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
* [[:Category:Plugins|Plugins]] | * [[:Category:Plugins|Plugins]] | ||
* [[:Special:Categories| See All Categories]] | * [[:Special:Categories| See All Categories]] | ||
<source lang="python"> | |||
############################################################################# | |||
# $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 ) | |||
</source> | |||
<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> |
Revision as of 12:51, 28 February 2005
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>