Skip to content

Commit

Permalink
Update Pharos3D. Flexophore and PheSA for enumerated products are now…
Browse files Browse the repository at this point in the history
… calculated in one rush.
  • Loading branch information
korffmo committed Sep 9, 2024
1 parent 9f876b8 commit bf123e4
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,11 @@ public class DescriptorHandlerFlexophore implements IDescriptorHandlerFlexophore

protected static final int MIN_NUM_ATOMS = 6;

// 250
public static final int NUM_CONFORMATIONS = 250;
/**
*
* 06.09.2024 Set to 200 to be aligned with PheSA
*/
public static final int NUM_CONFORMATIONS = 200;

public static final int MAX_NUM_SOLUTIONS = 1000;

Expand Down Expand Up @@ -384,6 +387,7 @@ public MolDistHistViz createVisualDescriptorSingleConf(ConformerSet conformerSet
return mdhv;
}


public MolDistHist createDescriptor(Object mol) {
StereoMolecule fragBiggest = (StereoMolecule)mol;

Expand Down Expand Up @@ -456,6 +460,10 @@ public MolDistHistViz createVisualDescriptor(StereoMolecule fragBiggest) {
return mdhv;
}

public MolDistHistViz createVisualDescriptor(ConformerSet cs){
return creatorMolDistHistViz.createFromConformerSet(cs);
}

public Exception getRecentException() {
return recentException;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
import com.actelion.research.calc.ArrayUtilsCalc;
import com.actelion.research.calc.ThreadMaster;
import com.actelion.research.chem.*;
import com.actelion.research.chem.conf.Conformer;
import com.actelion.research.chem.conf.ConformerSet;
import com.actelion.research.chem.descriptor.DescriptorHandlerFlexophore;
import com.actelion.research.chem.descriptor.flexophore.*;
import com.actelion.research.chem.descriptor.flexophore.redgraph.SubGraphExtractor;
Expand Down Expand Up @@ -210,6 +212,29 @@ public MolDistHistViz createMultipleConformations(StereoMolecule molOrig, int nC
MolDistHistViz mdhv = create(liMultCoordFragIndex, molViz);
return mdhv;
}
public MolDistHistViz createFromConformerSet(ConformerSet conformerSet) {

Molecule3D mol = new Molecule3D(conformerSet.iterator().next().toMolecule());
mol.ensureHelperArrays(Molecule.cHelperRings);
InteractionAtomTypeCalculator.setInteractionTypes(mol);

List<SubGraphIndices> liSGI = getSubGraphIndices(mol);
List<MultCoordFragIndex> liMultCoordFragIndex = new ArrayList<>();
for (SubGraphIndices subGraphIndices : liSGI) {
liMultCoordFragIndex.add(new MultCoordFragIndex(subGraphIndices.getAtomIndices()));
}

Iterator<Conformer> it = conformerSet.iterator();
while (it.hasNext()){
Conformer c = it.next();
Molecule3D molConf = new Molecule3D(c.toMolecule());
molConf.ensureHelperArrays(Molecule.cHelperRings);
calcFragmentCenter(molConf, liMultCoordFragIndex);
}

Molecule3D molViz = createPharmacophorePoints(mol, liMultCoordFragIndex);
return create(liMultCoordFragIndex, molViz);
}

public List<SubGraphIndices> getSubGraphIndices(Molecule3D molInPlace){
//
Expand Down

0 comments on commit bf123e4

Please sign in to comment.