728x90 AdSpace

Latest Article



Protein Data Bank PDB Structure Mutation Model Tool Java code Script Biojava




How you can Protein Data Bank PDB Structure Mutation Model Tool Java code Script Biojava you can mutate file using following code

package pdb;

import java.io.FileOutputStream;
import java.io.PrintStream;
import org.biojava.bio.structure.Mutator;
import org.biojava.bio.structure.Structure;
import org.biojava.bio.structure.io.PDBFileReader;

/**
 *
 * @author Usman
 */
public class Mutate {
   
   
 public static void main(String[] args) {
 
 String ProjectPath= System.getProperties().getProperty("user.dir");
 String filename =  ProjectPath+"/SamplePDB/12E8.pdb" ;
 String outputfile = ProjectPath+"/SamplePDB/mutated.pdb" ;

 PDBFileReader pdbreader = new PDBFileReader();

 try{
     Structure struc = pdbreader.getStructure(filename);
     System.out.println(struc);


     String chainId = " ";
     String pdbResnum = "3";
     String newType = "ARG";

     // mutate the original structure and create a new one.
     // lets side chain point into the same direction, but only uses Cb atom
      Mutator m = new Mutator();

      Structure newstruc = m.mutate(struc,chainId,pdbResnum,newType);
 
      FileOutputStream out= new FileOutputStream(outputfile);
      PrintStream p =  new PrintStream( out );
 
      p.println (newstruc.toPDB());
 
      p.close();
 
 
  } catch (Exception e) {
      e.printStackTrace();
  }
     }
}


no image
  • Title : Protein Data Bank PDB Structure Mutation Model Tool Java code Script Biojava
  • Posted by :
  • Date : 04:20
  • Labels :






  • Blogger Comments
  • Facebook Comments

0 comments:

Post a Comment