-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added Flexophore functionality for synthon processing
- Loading branch information
Showing
3 changed files
with
81 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/main/java/com/actelion/research/chem/descriptor/flexophore/PPNodeVizHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.actelion.research.chem.descriptor.flexophore; | ||
|
||
import com.actelion.research.chem.Molecule3D; | ||
import com.actelion.research.chem.StereoMolecule; | ||
import com.actelion.research.chem.descriptor.flexophore.redgraph.SubGraphIndices; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/* | ||
Created by Modest von Korff | ||
16/02/2024 | ||
*/ | ||
public class PPNodeVizHelper { | ||
|
||
public static PPNodeViz createWithoutCoordinates(SubGraphIndices sgi, int indexPPPoint, Molecule3D mol){ | ||
int [] arrIndexAtomFrag = sgi.getAtomIndices(); | ||
PPNodeViz ppNodeViz = new PPNodeViz(); | ||
ppNodeViz.setIndex(indexPPPoint); | ||
for (int index : arrIndexAtomFrag) { | ||
int interactionType = mol.getInteractionAtomType(index); | ||
ppNodeViz.add(interactionType); | ||
ppNodeViz.addIndexOriginalAtom(index); | ||
} | ||
return ppNodeViz; | ||
} | ||
public static List<PPNodeViz> createWithoutCoordinates(List<SubGraphIndices> liSubGraphIndices, Molecule3D mol){ | ||
List<PPNodeViz> liPPNodeViz = new ArrayList<>(); | ||
for (int i = 0; i < liSubGraphIndices.size(); i++) { | ||
SubGraphIndices sgi = liSubGraphIndices.get(i); | ||
PPNodeViz ppNodeViz = createWithoutCoordinates(sgi, i, mol); | ||
liPPNodeViz.add(ppNodeViz); | ||
} | ||
return liPPNodeViz; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters