pKaTool/Ghosts/Chemical_shift.py
def callpdb2pqr(self, pdbPath, pdbPathNew, pqrPath, pqrPathNew):
		'''
		Run pdb2pqr and convert pdb into pqr files
		'''
		try:
			from main import mainCommand
		except ImportError:
			from pdb2pqr.main import mainCommand
		#
		#using a system call
		#
		dir_name = os.getcwd()
		source = '%s/pqr.txt'%dir_name
		fd = open(source, 'w')
		fd.writelines([
			'python ~/python/pdb2pqr/pdb2pqr.py --ff=parse --chain %s %s\n'%(pdbPathNew, pqrPathNew),
			'python ~/python/pdb2pqr/pdb2pqr.py --ff=parse --chain %s %s\n'%(pdbPath, pqrPath),
			])
		fd.close()
		os.system('source %s > pqr.out'%source)
		#
		#without a system call
		#
		'''command1 = ['/home/predrag/python/pdb2pqr_svn/pdb2pqr.py', '--ff=amber', '%s'%pdbPathNew, '%s'%pqrPathNew]
		command2 = ['/home/predrag/python/pdb2pqr_svn/pdb2pqr.py', '--ff=amber', '%s'%pdbPath, '%s'%pqrPath]
		mainCommand(command1)
		mainCommand(command2)'''
		#
		#
		#
		return

		Run pdb2pqr and convert pdb into pqr files
		
Run pdb2pqr and convert pdb into pqr files
Run pdb2pqr and convert pdb into pqr files
def callpdb2pqr(self, pdbPath, pdbPathNew, pqrPath, pqrPathNew):
		try:
			from main import mainCommand
		except ImportError:
			from pdb2pqr.main import mainCommand
		using a system call
		dir_name = os.getcwd()
		source = '%s/pqr.txt'%dir_name
		fd = open(source, 'w')
		fd.writelines([
			'python ~/python/pdb2pqr/pdb2pqr.py --ff=parse --chain %s %s\n'%(pdbPathNew, pqrPathNew),
			'python ~/python/pdb2pqr/pdb2pqr.py --ff=parse --chain %s %s\n'%(pdbPath, pqrPath),
			])
		fd.close()
		os.system('source %s > pqr.out'%source)
		without a system call
		return
def callpdb2pqr ( self , pdbPath , pdbPathNew , pqrPath , pqrPathNew ) : try : from main import mainCommand except ImportError : from pdb2pqr . main import mainCommand dir_name = os . getcwd ( ) source = '%s/pqr.txt' % dir_name fd = open ( source , 'w' ) fd . writelines ( [ 'python ~/python/pdb2pqr/pdb2pqr.py --ff=parse --chain %s %s\n' % ( pdbPathNew , pqrPathNew ) , 'python ~/python/pdb2pqr/pdb2pqr.py --ff=parse --chain %s %s\n' % ( pdbPath , pqrPath ) , ] ) fd . close ( ) os . system ( 'source %s > pqr.out' % source ) '''command1 = ['/home/predrag/python/pdb2pqr_svn/pdb2pqr.py', '--ff=amber', '%s'%pdbPathNew, '%s'%pqrPathNew]
		command2 = ['/home/predrag/python/pdb2pqr_svn/pdb2pqr.py', '--ff=amber', '%s'%pdbPath, '%s'%pqrPath]
		mainCommand(command1)
		mainCommand(command2)''' return
Run pdb2pqr and convert pdb into pqr files
Run pdb2pqr and convert pdb into pqr files
'''
		Run pdb2pqr and convert pdb into pqr files
		''' # #using a system call # # #without a system call # '''command1 = ['/home/predrag/python/pdb2pqr_svn/pdb2pqr.py', '--ff=amber', '%s'%pdbPathNew, '%s'%pqrPathNew]
		command2 = ['/home/predrag/python/pdb2pqr_svn/pdb2pqr.py', '--ff=amber', '%s'%pdbPath, '%s'%pqrPath]
		mainCommand(command1)
		mainCommand(command2)''' # # #
self
pdbPath
pdbPathNew
pqrPath
pqrPathNew