Search in sources :

Example 1 with ChainContainer

use of de.bioforscher.jstructure.model.structure.container.ChainContainer in project jstructure by JonStargaryen.

the class ModelIntegrityTest method shouldGetProteinCopy.

@Test
public void shouldGetProteinCopy() {
    ChainContainer copiedProtein = protein.createCopy();
    Assert.assertTrue(copiedProtein instanceof Protein);
}
Also used : ChainContainer(de.bioforscher.jstructure.model.structure.container.ChainContainer) Protein(de.bioforscher.jstructure.model.structure.Protein) Test(org.junit.Test)

Example 2 with ChainContainer

use of de.bioforscher.jstructure.model.structure.container.ChainContainer in project jstructure by JonStargaryen.

the class CopyableTest method shouldCloneConcreteImplementationsOfAminoAcids.

@Test
public void shouldCloneConcreteImplementationsOfAminoAcids() {
    // clone containers led to groups losing their identity meaning they were no longer concrete amino acid
    // implementations but mere groups
    // will fail when copy does not contain amino acids
    ChainContainer proteinCopy = protein.createDeepCopy();
    System.out.println(proteinCopy.getAminoAcidSequence());
    Assert.assertFalse("no amino acid sequence - clone compromised", proteinCopy.getAminoAcidSequence().isEmpty());
    GroupContainer chainCopy = protein.getChains().get(0).createDeepCopy();
    System.out.println(chainCopy.getAminoAcidSequence());
    Assert.assertFalse("no amino acid sequence - clone compromised", chainCopy.getAminoAcidSequence().isEmpty());
}
Also used : ChainContainer(de.bioforscher.jstructure.model.structure.container.ChainContainer) GroupContainer(de.bioforscher.jstructure.model.structure.container.GroupContainer) Test(org.junit.Test)

Aggregations

ChainContainer (de.bioforscher.jstructure.model.structure.container.ChainContainer)2 Test (org.junit.Test)2 Protein (de.bioforscher.jstructure.model.structure.Protein)1 GroupContainer (de.bioforscher.jstructure.model.structure.container.GroupContainer)1