Search in sources :

Example 6 with Chain

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

the class SelectionTest method shouldSelectChains.

@Test
public void shouldSelectChains() {
    System.out.println("Chain 'A':");
    Chain chainA = protein.select().asChain();
    System.out.println(chainA);
    System.out.println("Chain 'B':");
    Chain chainB = protein.select().chainName("B").asChain();
    System.out.println(chainB);
    System.out.println("Chains 'B', 'C':");
    List<Chain> chains = protein.select().chainName("B", "C").asFilteredChains().collect(Collectors.toList());
    Assert.assertEquals("chains do not match, expected 'B' and 'C' - found: " + chains, 2, chains.size());
    chains.forEach(System.out::println);
}
Also used : Chain(de.bioforscher.jstructure.model.structure.Chain) Test(org.junit.Test)

Aggregations

Chain (de.bioforscher.jstructure.model.structure.Chain)6 Test (org.junit.Test)3 Group (de.bioforscher.jstructure.model.structure.Group)2 Protein (de.bioforscher.jstructure.model.structure.Protein)2 List (java.util.List)2 Document (org.jsoup.nodes.Document)2 ComputationException (de.bioforscher.jstructure.feature.ComputationException)1 ResidueNumber (de.bioforscher.jstructure.model.structure.ResidueNumber)1 GroupContainer (de.bioforscher.jstructure.model.structure.container.GroupContainer)1 ProteinIdentifier (de.bioforscher.jstructure.model.structure.identifier.ProteinIdentifier)1 ProteinParser (de.bioforscher.jstructure.parser.ProteinParser)1 File (java.io.File)1 IOException (java.io.IOException)1 UncheckedIOException (java.io.UncheckedIOException)1 Constructor (java.lang.reflect.Constructor)1 Files (java.nio.file.Files)1 Path (java.nio.file.Path)1 Paths (java.nio.file.Paths)1 ArrayList (java.util.ArrayList)1 Comparator (java.util.Comparator)1