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

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

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

import java.util.HashMap;
import java.util.HashSet;
import java.util.Random;
import java.util.Set;

import com.actelion.research.calc.Matrix;
import com.actelion.research.chem.Coordinates;
import com.actelion.research.chem.StereoMolecule;
import com.actelion.research.chem.conf.Conformer;
import com.actelion.research.chem.interactionstatistics.InteractionAtomTypeCalculator;
import com.actelion.research.chem.io.pdb.converter.MoleculeGrid;
import com.actelion.research.chem.phesa.DescriptorHandlerShape;
import com.actelion.research.chem.phesa.MolecularVolume;
import com.actelion.research.chem.phesa.OptimizerLBFGS;
import com.actelion.research.chem.phesa.PheSAAlignment;
import com.actelion.research.chem.phesa.PheSAMolecule;

public class DockingEngine {
	
	private static final int DEFAULT_NR_MC_STEPS = 200;
	private static final int DEFAULT_START_POSITIONS = 5;
	private static final double BOLTZMANN_FACTOR = 0.593;
	
	private StereoMolecule receptor;
	private MoleculeGrid grid;
	private PheSAMolecule refVol;
	private Matrix rotation; //for initial prealignment to native ligand
	private Coordinates origCOM;
	private int mcSteps;
	private int startPositions;
	private Random random;
	
	public DockingEngine(StereoMolecule receptor, StereoMolecule nativeLigand, int mcSteps, int startPositions) {
		grid = new MoleculeGrid(nativeLigand, 0.5, new Coordinates(8.0,8.0,8.0),false);
		MolecularVolume molVol = new MolecularVolume(nativeLigand);
		origCOM  = new Coordinates(molVol.getCOM());
		Conformer conf = new Conformer(nativeLigand);
		rotation = PheSAAlignment.preProcess(conf, molVol).getTranspose();
		refVol = new PheSAMolecule(nativeLigand,molVol);
		this.mcSteps = mcSteps;
		this.startPositions = startPositions;
		this.random = new Random(12354L);
		this.receptor = receptor;
	}
	
	public DockingEngine(StereoMolecule receptor, StereoMolecule nativeLigand) {
		this(receptor,nativeLigand,DEFAULT_NR_MC_STEPS,DEFAULT_START_POSITIONS);
	}
	
	
	
	public StereoMolecule dockMolecule(StereoMolecule mol) {
		DescriptorHandlerShape dhs = new DescriptorHandlerShape();
		PheSAMolecule pheSAMol = dhs.createDescriptor(mol);
		dhs.getSimilarity(refVol,pheSAMol);
		StereoMolecule alignedMol = dhs.getPreviousAlignment()[1];
		for(int a=0;a receptorAtoms = new HashSet();
		int[] receptorAtomTypes = new int[receptor.getAtoms()];
		for(int i=0;i0 && x0 && y0 && z




© 2015 - 2025 Weber Informatics LLC | Privacy Policy