use of model.Polymer in project Smiles2Monomers by yoann-dufresne.
the class IsomorphismTests method notMatchingAromaticTest.
@Test
public void notMatchingAromaticTest() {
Polymer pep = new Polymer(0, "", "SC1CCCCC1", null);
List<MappedChain> mbs = Isomorphism.searchAChain(this.bloc, pep, MatchingType.STRONG);
Assert.assertFalse(mbs.size() > 0);
}
use of model.Polymer in project Smiles2Monomers by yoann-dufresne.
the class IsomorphismTests method lightMatchingAromaticTest.
@Test
public void lightMatchingAromaticTest() {
Polymer pep = new Polymer(0, "", "SC1CCCCC1", null);
List<MappedChain> mbs = Isomorphism.searchAChain(this.bloc, pep, MatchingType.LIGHT);
Assert.assertTrue(mbs.size() > 0);
}
use of model.Polymer in project Smiles2Monomers by yoann-dufresne.
the class IsomorphismTests method setUp.
@Before
public void setUp() throws Exception {
// Database
Monomer[] monos = new Monomer[1];
Polymer pepTest = new Polymer(0, "malformin A1", "O=C1NC2C(=O)NC(C(=O)NC(C(=O)NC(C(=O)NC1CSSC2)C(C)CC)CC(C)C)C(C)C", monos);
// Extensions
IAtom a = new Atom("C");
IBond b1 = new Bond(new Atom("S"), a, Order.SINGLE);
this.ext1 = new Extension(b1);
a = new Atom("C");
IAtom a2 = new Atom("C");
IBond b2 = new Bond(a, a2, Order.SINGLE);
this.ext2 = new Extension(b2);
// Mapped blocs
this.mb0 = new MappedChain(pepTest, null, new ArrayList<Integer>(), new ArrayList<Integer>(), new ArrayList<MatchingType>(), new HashMap<Integer, Integer>());
// For blocs Tests
this.bloc = new Chain("S,0,c,0,0,-1,-1;c,0,c,0,0,-1,1");
}
use of model.Polymer in project Smiles2Monomers by yoann-dufresne.
the class IsomorphismTests method matchingAromaticTest.
@Test
public void matchingAromaticTest() {
Polymer pep = new Polymer(0, "", "Sc1ccccc1", null);
List<MappedChain> mbs = Isomorphism.searchAChain(this.bloc, pep, MatchingType.STRONG);
Assert.assertTrue(mbs.size() > 0);
}
use of model.Polymer in project Smiles2Monomers by yoann-dufresne.
the class TreeWidthTests method test.
@Test
public void test() {
MolTreeWidth mtw = new MolTreeWidth();
Polymer pep = null;
try {
pep = this.pepDB.getObject("250");
} catch (NullPointerException e) {
e.printStackTrace();
}
try {
assertEquals(2, mtw.calculateTreeWidth(SmilesConverter.conv.transform(pep.getSmiles())));
} catch (InvalidSmilesException e) {
System.err.println("Impossible to parse smiles");
}
}
Aggregations