com.actelion.research.chem.chemicalspaces.ptree.synthon.PharmTreeSynthonLibrary Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openchemlib Show documentation
Show all versions of openchemlib Show documentation
Open Source Chemistry Library
package com.actelion.research.chem.chemicalspaces.ptree.synthon;
import java.util.ArrayList;
import java.util.List;
import com.actelion.research.chem.StereoMolecule;
import com.actelion.research.chem.chemicalspaces.ptree.PharmTreeSynthonReactionHelper;
public class PharmTreeSynthonLibrary {
private List> synthons;
private PharmTreeSynthonReactionHelper rxnHelper;
private String reactionID;
public PharmTreeSynthonLibrary(List> synthons) {
this.synthons = synthons;
rxnHelper = new PharmTreeSynthonReactionHelper(getGenericReactants());
}
public List> getSynthons() {
return synthons;
}
public PharmTreeSynthonReactionHelper getReactionHelper() {
return rxnHelper;
}
public void setReactionHelper(PharmTreeSynthonReactionHelper reactor) {
this.rxnHelper = reactor;
}
public List getGenericReactants() {
List genericReactants = new ArrayList<>();
for(List synthonList : synthons) {
StereoMolecule minimalSynthon = synthonList.get(0).createMinimalSynthon();
genericReactants.add(minimalSynthon);
}
return genericReactants;
}
public String getReactionID() {
return reactionID;
}
public void setReactionID(String reactionID) {
this.reactionID = reactionID;
}
}