use of de.bioforscher.jstructure.model.structure.container.AtomContainer in project jstructure by JonStargaryen.
the class StructureCollectorsTest method shouldCreateDistinctContainer.
@Test
public void shouldCreateDistinctContainer() {
// create copy
AminoAcid original = protein.select().aminoAcids().asAminoAcid();
String initialPdbRecord = original.getPdbRepresentation();
AtomContainer copy = original.createDeepCopy();
// manipulate coordinates of copy
copy.getAtoms().get(0).setCoordinates(new double[] { 0, 0, 0 });
// should not affect original
Assert.assertNotEquals(initialPdbRecord, copy.getPdbRepresentation());
Assert.assertEquals(initialPdbRecord, original.getPdbRepresentation());
}
use of de.bioforscher.jstructure.model.structure.container.AtomContainer in project jstructure by JonStargaryen.
the class SelectionTest method shouldSelectAtomsFromGroupsFromChains.
@Test
public void shouldSelectAtomsFromGroupsFromChains() {
System.out.println("alpha carbons and beta carbons of PHEs in chain 'A' and 'C'");
AtomContainer atoms = protein.select().chainName("A", "C").groupName(Phenylalanine.THREE_LETTER_CODE).atomName(AminoAcid.ALPHA_CARBON_NAME, AminoAcid.BETA_CARBON_NAME).asIsolatedStructure();
System.out.println(atoms.getPdbRepresentation());
}
Aggregations