Esempio n. 1
0
############################ main #####################################
if args.method != 'contacts1_chem':
	print('Other methods are not implemented')
	sys.exit(1)
baseDockingResults = readDockingResults(args.baseDockingResult)

namesTrainChem, vectorsTrainChem = getChemThainingCompondsAsVectors(inhibitorsChsIds, notInhibitorsChsIds, False)
chemTrainMolsDict = dict(zip(namesTrainChem, vectorsTrainChem))
namesBaseChem, vectorsBaseChem = getChemMoleculesAsBitVectorsOneByOne(args.baseMol2)


box = boxParams(point3D(asCenterX, asCenterY, asCenterZ), point3D(gridSizeX, gridSizeY, gridSizeZ))
proteinActiveSiteAtoms = getProteinActiveSiteAtoms(args.proteinMol2, box)


namesTrainContacts, vectorsTrainContacts = getProteinContactsAsBitVectors(proteinActiveSiteAtoms, args.trainingDockedMol2)
contactsTrainMolsDict = dict(zip(namesTrainContacts, vectorsTrainContacts))
namesBaseContacts, vectorsBaseContacts = getProteinContactsAsBitVectors(proteinActiveSiteAtoms, args.baseDockedMol2)
contactsBaseMolsDict = dict(zip(namesBaseContacts, vectorsBaseContacts))
		


logMsg('Calculating inhibitors pattern')
inhibitorsPattern = constructPattern(contactsTrainMolsDict, chemTrainMolsDict, 'yes')
logMsg('Calculating not inhibitors pattern')
notInhibitorsPattern = constructPattern(contactsTrainMolsDict, chemTrainMolsDict, 'not')

for i in range(len(inhibitorsPattern)):
	print(i + 1, inhibitorsPattern[i], notInhibitorsPattern[i])

mostEssentialRes = getMostEssentialResidues(inhibitorsPattern, notInhibitorsPattern, proteinActiveSiteAtoms)
Esempio n. 2
0
								 epilog="\xa9 Avktex 2016")
parser.add_argument('-im', '--inputMol2', metavar='GlobConfig', type=str, help='Full path to multiMol2 training compounds docked file.', required=True)
parser.add_argument('-pr', '--proteinMol2', metavar='GlobConfig', type=str, help='Full path to file with protein in mol2 format.', required=True)
parser.add_argument('-dm', '--distanceMatrixOutput', metavar='GlobConfig', type=str, help='Full path to distance matrix output file.', required=True)
#parser.add_argument('-bp', '--boxParams', metavar='GlobConfig', type=double, help='Box params file', required=True)
args = parser.parse_args()

if not os.path.isfile(args.inputMol2):
	print('Docked training compounds mol2 file is not exists')
	sys.exit(1)
if not os.path.isfile(args.proteinMol2):
	print('Protein mol2 file is not exists')
	sys.exit(1)

############################ PARAMS #####################################
asCenterX = -26.9
asCenterY = 21.9
asCenterZ = -76.9

gridSizeX = 30
gridSizeY = 30
gridSizeZ = 30
############################ PARAMS #####################################

box = boxParams(point3D(asCenterX, asCenterY, asCenterZ), point3D(gridSizeX, gridSizeY, gridSizeZ))

filterBoxAtoms = getProteinActiveSiteAtoms(args.proteinMol2, box)
names, vectors = getProteinContactsAsBitVectors(filterBoxAtoms, args.inputMol2)
#drawTree(distanceMatrixToTree(getDistanceMatrix(names, vectors)))
genDistanceMatrixFileManyCompounds(args.distanceMatrixOutput, names, vectors)