pKaTool/Ghosts/Chemical_shift_md.py
def parseCoord(self, pdb):
		'''
		Parse coordinates from the pdb file
		'''
		try:
			fd = open(pdb, 'r');
			lines = fd.readlines()
			fd.close()
		except:
			print '\n\t\tFATAL: Cannot open %s file'%pdb
			sys.exit(1)
			
		coordMol = {}
		coordSol = {}
		coordCl = {}
		for line in lines:
			record = line[:6].strip()
			if record == 'ATOM':
				resNum = parseResNum(line)
				resName = parseResName(line)
				atomName = parseAtomName(line)
				coordinates = eval(getCoordinates(line))
				if resName in solvent:
					if not resNum in coordSol.keys():
						coordSol[resNum] = {}
					coordSol[resNum][atomName] = coordinates
				elif resName in chloride:
					coordCl[resNum] = coordinates
				else:
					if not resNum in coordMol.keys():
						coordMol[resNum] = {}
					coordMol[resNum][atomName] = coordinates
		return coordMol, coordSol, coordCl

		Parse coordinates from the pdb file
		
Parse coordinates from the pdb file
Parse coordinates from the pdb file
def parseCoord(self, pdb):
		try:
			fd = open(pdb, 'r');
			lines = fd.readlines()
			fd.close()
		except:
			print '\n\t\tFATAL: Cannot open %s file'%pdb
			sys.exit(1)
		coordMol = {}
		coordSol = {}
		coordCl = {}
		for line in lines:
			record = line[:6].strip()
			if record == 'ATOM':
				resNum = parseResNum(line)
				resName = parseResName(line)
				atomName = parseAtomName(line)
				coordinates = eval(getCoordinates(line))
				if resName in solvent:
					if not resNum in coordSol.keys():
						coordSol[resNum] = {}
					coordSol[resNum][atomName] = coordinates
				elif resName in chloride:
					coordCl[resNum] = coordinates
				else:
					if not resNum in coordMol.keys():
						coordMol[resNum] = {}
					coordMol[resNum][atomName] = coordinates
		return coordMol, coordSol, coordCl
def parseCoord ( self , pdb ) : try : fd = open ( pdb , 'r' ) ; lines = fd . readlines ( ) fd . close ( ) except : print '\n\t\tFATAL: Cannot open %s file' % pdb sys . exit ( 1 ) coordMol = { } coordSol = { } coordCl = { } for line in lines : record = line [ : 6 ] . strip ( ) if record == 'ATOM' : resNum = parseResNum ( line ) resName = parseResName ( line ) atomName = parseAtomName ( line ) coordinates = eval ( getCoordinates ( line ) ) if resName in solvent : if not resNum in coordSol . keys ( ) : coordSol [ resNum ] = { } coordSol [ resNum ] [ atomName ] = coordinates elif resName in chloride : coordCl [ resNum ] = coordinates else : if not resNum in coordMol . keys ( ) : coordMol [ resNum ] = { } coordMol [ resNum ] [ atomName ] = coordinates return coordMol , coordSol , coordCl
Parse coordinates from the pdb file
Parse coordinates from the pdb file
'''
		Parse coordinates from the pdb file
		'''
self
pdb