Skip to content

Commit 34e3b04

Browse files
committed
More manual fixes
1 parent ce2c56f commit 34e3b04

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

_wikis/BioJava:CookBook:PDB:atomsCalc.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,24 @@ The
88
[Calc](http://www.biojava.org/docs/api/org/biojava/bio/structure/Calc.html)
99
class provides a set of methods that can be used for calculations.
1010

11-
```java public double getPhi(Group a, Group b)
11+
```java
12+
public double getPhi(Group a, Group b)
1213

13-
`   throws StructureException`
14-
`   {`
15-
`       `
16-
`       if ( ! Calc.isConnected(a,b)){`
17-
`           throw new StructureException("can not calc Phi - AminoAcids are not connected!") ;`
18-
`       } `
19-
`       `
20-
`       Atom a_C  = a.getAtom("C");`
21-
`       Atom b_N  = b.getAtom("N");`
22-
`       Atom b_CA = b.getAtom("CA");`
23-
`       Atom b_C  = b.getAtom("C");`
24-
`       `
25-
`       double phi = Calc.torsionAngle(a_C,b_N,b_CA,b_C);`
26-
`       return phi ;`
27-
`   }`
14+
   throws StructureException
15+
   {
16+
       
17+
       if ( ! Calc.isConnected(a,b)){
18+
           throw new StructureException("can not calc Phi - AminoAcids are not connected!") ;
19+
       } 
20+
       
21+
       Atom a_C  = a.getAtom("C");
22+
       Atom b_N  = b.getAtom("N");
23+
       Atom b_CA = b.getAtom("CA");
24+
       Atom b_C  = b.getAtom("C");
25+
       
26+
       double phi = Calc.torsionAngle(a_C,b_N,b_CA,b_C);
27+
       return phi ;
28+
   }
2829

2930
```
3031

0 commit comments

Comments
 (0)