Skip to content

Commit fb9d71c

Browse files
Rahbrandreasprlic
authored andcommitted
/* Como eu posso mutar um residuo? */
1 parent 0958925 commit fb9d71c

2 files changed

Lines changed: 82 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: BioJava:CookbookPortuguese:PDB:mutate
3+
---
4+
5+
### Como eu posso mutar um residuo?
6+
7+
<java>
8+
9+
`// mutar uma estrutura de proteina`
10+
`// e salvar para arquivo`
11+
12+
`String filename   =  "5pti.pdb" ;`
13+
`String outputfile =  "mutated.pdb" ;`
14+
15+
`PDBFileReader pdbreader = new PDBFileReader();`
16+
17+
`try{`
18+
`    Structure struc = pdbreader.getStructure(filename);`
19+
`    System.out.println(struc);`
20+
21+
22+
`    String chainId = " ";`
23+
`    String pdbResnum = "3";`
24+
`    String newType = "ARG";`
25+
26+
`    // muta a estrutura original e cria uma nova.`
27+
`    // deixa ponto de corrente lateral na mesma direção, mas só usa átomo Cb`
28+
`     Mutator m = new Mutator();`
29+
30+
`     Structure newstruc = m.mutate(struc,chainId,pdbResnum,newType);`
31+
` `
32+
`     FileOutputStream out= new FileOutputStream(outputfile); `
33+
`     PrintStream p =  new PrintStream( out );`
34+
` `
35+
`     p.println (newstruc.toPDB());`
36+
` `
37+
`     p.close();`
38+
` `
39+
` `
40+
` } catch (Exception e) {`
41+
`     e.printStackTrace();`
42+
` } `
43+
44+
</java>
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
=== Como eu posso mutar um residuo? ===
2+
3+
<java>
4+
// mutar uma estrutura de proteina
5+
// e salvar para arquivo
6+
7+
String filename = "5pti.pdb" ;
8+
String outputfile = "mutated.pdb" ;
9+
10+
PDBFileReader pdbreader = new PDBFileReader();
11+
12+
try{
13+
Structure struc = pdbreader.getStructure(filename);
14+
System.out.println(struc);
15+
16+
17+
String chainId = " ";
18+
String pdbResnum = "3";
19+
String newType = "ARG";
20+
21+
// muta a estrutura original e cria uma nova.
22+
// deixa ponto de corrente lateral na mesma direção, mas só usa átomo Cb
23+
Mutator m = new Mutator();
24+
25+
Structure newstruc = m.mutate(struc,chainId,pdbResnum,newType);
26+
27+
FileOutputStream out= new FileOutputStream(outputfile);
28+
PrintStream p = new PrintStream( out );
29+
30+
p.println (newstruc.toPDB());
31+
32+
p.close();
33+
34+
35+
} catch (Exception e) {
36+
e.printStackTrace();
37+
}
38+
</java>

0 commit comments

Comments
 (0)