use of de.bioforscher.jstructure.model.structure.Structure in project jstructure by JonStargaryen.
the class ProteinLigandInteractionProfiler method parseHydrophobicInteractions.
private void parseHydrophobicInteractions(Structure structure, Element interactionElement, List<Interaction> interactions) {
Elements hydrophobicInteractions = interactionElement.getElementsByTag("hydrophobic_interaction");
hydrophobicInteractions.stream().map(element -> parseHydrophobicInteraction(structure, element)).filter(Optional::isPresent).map(Optional::get).forEach(interactions::add);
}
use of de.bioforscher.jstructure.model.structure.Structure in project jstructure by JonStargaryen.
the class ProteinLigandInteractionProfilerTest method test_ligand_1h2t.
@Test
public void test_ligand_1h2t() {
Structure structure = StructureParser.fromPdbId("1h2t").parse();
Group ligand = structure.select().chainId("Z").residueNumber(1151).asGroup();
InteractionContainer interactions = instance.annotateLigandInteractions(structure).getSubsetOfInteractions(ligand);
Assert.assertFalse(interactions.getInteractions().isEmpty());
// TODO offset in renumbering of residues
// Group res20 = structure.getGroups().get(21);
// Group res43 = structure.select().residueNumber(43).asGroup();
// Group res112 = structure.select().residueNumber(112).asGroup();
// Group res116 = structure.select().residueNumber(116).asGroup();
// Assert.assertFalse(interactions.getSubsetOfInteractions(res20).getPiStackingInteractions().isEmpty());
// Assert.assertFalse(interactions.getSubsetOfInteractions(res43).getPiStackingInteractions().isEmpty());
// Assert.assertFalse(interactions.getSubsetOfInteractions(res112).getHydrogenBonds().isEmpty());
// Assert.assertFalse(interactions.getSubsetOfInteractions(res116).getSaltBridges().isEmpty());
}
use of de.bioforscher.jstructure.model.structure.Structure in project jstructure by JonStargaryen.
the class ProteinLigandInteractionProfilerTest method test_ligand_3g1h.
@Test
public void test_ligand_3g1h() {
Structure structure = StructureParser.fromPdbId("3g1h").parse();
InteractionContainer interactionContainer = instance.annotateLigandInteractions(structure);
// there are strange effects regarding how interactions are associated to individual ligands
Group ligand_H2U_A_229 = structure.select().chainId("A").residueNumber(229).asGroup();
InteractionContainer ic_H2U_A_229 = interactionContainer.getSubsetOfInteractions(ligand_H2U_A_229);
Assert.assertEquals("hydrophobic count does not match", 1, ic_H2U_A_229.getHydrophobicInteractions().size());
Assert.assertEquals("hydrogen bond count does not match", 9, ic_H2U_A_229.getHydrogenBonds().size());
Assert.assertEquals("water bridge count does not match", // offset between PLIP CLI and web server
4 + 1, ic_H2U_A_229.getWaterBridges().size());
Assert.assertEquals("salt bridge count does not match", 1, ic_H2U_A_229.getSaltBridges().size());
}
use of de.bioforscher.jstructure.model.structure.Structure in project jstructure by JonStargaryen.
the class SecondaryStructureElementTest method shouldFailOnStructureWithNonStandardAminoAcids.
@Test(expected = ComputationException.class)
public void shouldFailOnStructureWithNonStandardAminoAcids() {
String pdbId = "5tcx";
Structure structure = StructureParser.fromPdbId(pdbId).minimalParsing(true).parse();
structure.aminoAcids().forEach(aminoAcid -> aminoAcid.getFeature(GenericSecondaryStructure.class).getSurroundingSecondaryStructureElement(aminoAcid));
}
use of de.bioforscher.jstructure.model.structure.Structure in project jstructure by JonStargaryen.
the class SecondaryStructureElementTest method shouldHandleStructureWithNonStandardAminoAcids.
@Test
public void shouldHandleStructureWithNonStandardAminoAcids() {
String pdbId = "5tcx";
Structure structure = StructureParser.fromPdbId(pdbId).parse();
structure.aminoAcids().forEach(aminoAcid -> aminoAcid.getFeature(GenericSecondaryStructure.class).getSurroundingSecondaryStructureElement(aminoAcid));
}
Aggregations