Esempio n. 1
0
 /**
  * @param pdb
  * @param type
  * @return voronoi data reuced and decomposited by given pdbmodel no grid will be used
  */
 public VoronoiData prepareSimple(PDBEntry pdb, VoroPrepType type) {
   VoronoiData data;
   data = new VoronoiData(pdb.getId());
   data.reducePDB(type, pdb);
   voro.decomposite(data);
   return data;
 }
Esempio n. 2
0
 /**
  * voronoi data container for multiple sequence scoring on model will be initialized
  *
  * @param model
  * @return voronoi data reuced and decomposited by given pdbmodel grid will be used and generated
  */
 @Override
 public void prepareSequenceScoring(Object model) {
   PDBEntry entry = (PDBEntry) model;
   data = new VoronoiData(entry.getId());
   data.reducePDB(entry);
   data.fillGridWithoutClashes(gridExtend, gridDensity, gridClash);
   voro.decomposite(data);
   data.detectOuterGrid(minContact);
 }
Esempio n. 3
0
 /**
  * normal preparation of data in solvent
  *
  * @param pdb
  * @param gridExtend
  * @param gridDensity
  * @param gridClash
  * @param minContact
  * @return voronoi data reuced and decomposited by given pdbmodel grid will be used and generated
  */
 public VoronoiData prepareWithGrid(
     PDBEntry pdb, double gridExtend, double gridDensity, double gridClash, double minContact) {
   VoronoiData data;
   data = new VoronoiData(pdb.getId());
   data.reducePDB(pdb);
   data.fillGridWithoutClashes(gridExtend, gridDensity, gridClash);
   voro.decomposite(data);
   data.detectOuterGrid(minContact);
   return data;
 }
Esempio n. 4
0
 /**
  * goes through a PDB Entry and reads protein fragments using the CA atoms
  *
  * @param pdb the entry to crunch
  * @param l a list of protein fragments
  * @param fLength the desired length of protein fragments
  * @return the new list of fragments
  */
 public static LinkedList<ProteinFragment> crunchBackboneN(
     PDBEntry pdb, String secStruct, LinkedList<ProteinFragment> l, int fLength) {
   try {
     String curSecStruct = "";
     for (int i = 0; i < pdb.length() - fLength; i++) {
       Atom[] temp = new Atom[fLength];
       for (int j = i; j < i + fLength; j++) {
         temp[j - i] = pdb.getAminoAcid(j).getAtomByType(AtomType.CA);
       }
       curSecStruct = secStruct.substring(i, i + fLength);
       ProteinFragment tempFrag =
           new ProteinFragment(pdb.getId() + "_" + i, curSecStruct, temp, fLength);
       l.add(tempFrag);
     }
     return l;
   } catch (Exception e) {
     System.out.println("Entry " + pdb.getId() + " probably has incomplete records.");
   }
   return null;
 }
Esempio n. 5
0
 /**
  * alternative version that returns the sequence along with the other stuff.
  *
  * @param pdb the entry to crunch
  * @param l a list of protein fragments
  * @param fLength the desired length of protein fragments
  * @return the new list of fragments
  */
 public static List<ProteinFragment> crunchBackboneSeq(
     PDBEntry pdb, List<ProteinFragment> l, int fLength) {
   try {
     AminoAcid tempAA = new AminoAcid("ALA", 0);
     StringBuilder seq = new StringBuilder();
     for (int i = 0; i < pdb.length() - fLength; i++) {
       Atom[] temp = new Atom[fLength];
       seq.delete(0, fLength);
       for (int j = i; j < i + fLength; j++) {
         tempAA = pdb.getAminoAcid(j);
         seq.append(tempAA.getName().getOneLetterCode());
         temp[j - i] = tempAA.getAtomByType(AtomType.CA).clone();
       }
       ProteinFragment tempFrag =
           new ProteinFragment(pdb.getId() + "_" + i, seq.toString(), temp, fLength);
       l.add(tempFrag);
     }
     return l;
   } catch (Exception e) {
     System.out.println("Entry " + pdb.getId() + " probably has incomplete records.");
     e.printStackTrace();
   }
   return null;
 }