/usr/lib/python2.7/dist-packages/chempy/cc1.py is in pymol 1.7.0.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | #A* -------------------------------------------------------------------
#B* This file contains source code for the PyMOL computer program
#C* copyright 1998-2000 by Warren Lyford Delano of DeLano Scientific.
#D* -------------------------------------------------------------------
#E* It is unlawful to modify or remove this copyright notice.
#F* -------------------------------------------------------------------
#G* Please see the accompanying LICENSE file for further information.
#H* -------------------------------------------------------------------
#I* Additional authors of this source file include:
#-*
#-*
#-*
#Z* -------------------------------------------------------------------
from chempy.models import Indexed
from chempy import Storage,Atom,Bond
import string
class CC1(Storage): # ChemDraw3D 5.0 std., cartesian coordinates
def fromList(self,molList):
model = Indexed()
# read header information
nAtom = int(molList[0][0:3])
# read atoms and bonds
id_dict = {}
irec = 1
cnt = 0
for a in range(nAtom):
at = Atom()
at.index = cnt
id_dict[string.strip(molList[irec][3:8])] = at.index
at.coord = [float(molList[irec][8:20]),
float(molList[irec][20:32]),float(molList[irec][32:44])]
at.symbol = string.strip(molList[irec][0:3])
at.numeric_type = int(molList[irec][44:49])
lst = string.split(string.strip(molList[irec][49:]))
at.bonds = lst
irec = irec + 1
cnt = cnt + 1
model.atom.append(at)
# interpret bonds
cnt = 0
for a in model.atom:
lst = a.bonds
del a.bonds
for b in lst:
if a.index<id_dict[b]:
bnd = Bond()
bnd.index = [ a.index,id_dict[b]]
model.bond.append(bnd)
# obtain formal charges from M CHG record
return model
#------------------------------------------------------------------------------
def toList(self,model):
return []
# not implemented yet
|