All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.actelion.research.chem.docking.ScoringTask Maven / Gradle / Ivy

There is a newer version: 2024.11.2
Show newest version
package com.actelion.research.chem.docking;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import com.actelion.research.chem.Coordinates;
import com.actelion.research.chem.Molecule3D;
import com.actelion.research.chem.StereoMolecule;
import com.actelion.research.chem.conf.Conformer;
import com.actelion.research.chem.docking.scoring.idoscore.InteractionTerm;
import com.actelion.research.chem.interactionstatistics.InteractionDistanceStatistics;
import com.actelion.research.chem.interactionstatistics.SplineFunction;
import com.actelion.research.chem.io.pdb.converter.MoleculeGrid;
import com.actelion.research.chem.potentialenergy.PotentialEnergyTerm;


public class ScoringTask {
	
	/**
	 * 
	 * @param receptor
	 * @param ligand
	 * @param receptorAtomTypes
	 * @param ligandAtomTypes
	 * @return
	 */
	public static double calcScore(StereoMolecule receptor, StereoMolecule ligand, int[] receptorAtomTypes, int[] ligandAtomTypes) {
		Set receptorAtoms = new HashSet(); 
		List terms = new ArrayList();
		MoleculeGrid molGrid = new MoleculeGrid(receptor);
		for(int l=0;l receptorAtoms = new HashSet(); 
		MoleculeGrid grid = new MoleculeGrid(receptor);
		receptorAtoms.addAll(grid.getNeighbours(c, InteractionDistanceStatistics.CUTOFF_RADIUS));
		for(int p : receptorAtoms) {
			SplineFunction f = InteractionDistanceStatistics.getInstance().getFunction(receptorAtomTypes[p], probeAtomType);
			double dist = c.distance(receptor.getCoordinates(p));
			score+=f.getFGValue(dist)[0];
		}
		
	
		
		return score;
		
		
	}
	

};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy