use of de.bioforscher.jstructure.model.structure.Structure in project jstructure by JonStargaryen.
the class AtomContainer method getPdbRepresentation.
default String getPdbRepresentation() {
Structure structure;
try {
structure = getAtoms().get(0).getParentGroup().getParentChain().getParentStructure();
} catch (Exception e) {
structure = Structure.UNKNOWN_STRUCTURE;
}
// ensure ordering of atoms according to their pdbSerials
List<Atom> sortedAtoms = atoms().sorted(Comparator.comparingInt(Atom::getPdbSerial)).collect(Collectors.toList());
return getPdbRepresentation(sortedAtoms, structure);
// return getPdbRepresentation(getAtoms(), structure);
}
use of de.bioforscher.jstructure.model.structure.Structure in project jstructure by JonStargaryen.
the class EnergyProfileCalculatorTest method shouldProcessStructureWithMPH.
@Test
public void shouldProcessStructureWithMPH() {
Structure protein = StructureParser.fromPdbId("1P7P").parse();
featureProvider.process(protein);
}
use of de.bioforscher.jstructure.model.structure.Structure in project jstructure by JonStargaryen.
the class EnergyProfileCalculatorTest method shouldProcessStructure.
@Test
public void shouldProcessStructure() {
Structure protein = StructureParser.fromPdbId("1ATI").parse();
featureProvider.process(protein);
}
use of de.bioforscher.jstructure.model.structure.Structure in project jstructure by JonStargaryen.
the class DictionaryOfProteinSecondaryStructureTest method getSecondaryStructureAnnotation.
private String getSecondaryStructureAnnotation(String id) {
// load structure
Structure protein = StructureParser.fromPdbId(id).parse();
// assign states
featureProvider.process(protein);
// return complete DSSP annotation string from jstructrue
return protein.aminoAcids().map(residue -> residue.getFeature(DSSPSecondaryStructure.class)).map(DSSPSecondaryStructure::getSecondaryStructure).map(SecondaryStructureType::getOneLetterRepresentation).map(character -> character.equals("c") ? " " : character).collect(Collectors.joining());
}
use of de.bioforscher.jstructure.model.structure.Structure in project jstructure by JonStargaryen.
the class DictionaryOfProteinSecondaryStructureTest method test1btaBiojava.
@Test
public void test1btaBiojava() throws IOException, StructureException {
org.biojava.nbio.structure.Structure structure = new PDBFileReader().getStructureById("1bta");
new SecStrucCalc().calculate(structure, true);
// return complete DSSP annotation string from BioJava
System.out.println(structure.getChains().stream().flatMap(chain -> chain.getAtomGroups(GroupType.AMINOACID).stream()).map(aminoAcid -> aminoAcid.getProperty(Group.SEC_STRUC)).map(SecStrucState.class::cast).map(SecStrucState::getType).map(type -> String.valueOf(type.type)).map(type -> type.equals(" ") ? "-" : type).collect(Collectors.joining()));
}
Aggregations