Skip to content

Commit a4c9844

Browse files
committed
more docu on alt locs
1 parent cc5a221 commit a4c9844

File tree

1 file changed

+57
-1
lines changed

1 file changed

+57
-1
lines changed

structure/special.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,67 @@
22

33
## Alternate Locations
44

5+
Some PDB entries contain alternate conformations for parts of a structure or a group. BioJava merges alternate conformations into a single group, for which alternative groups are available.
6+
7+
```java
8+
9+
Structure s = StructureIO.getStructure("1AAC");
10+
11+
Chain a = s.getChainByPDB("A");
12+
13+
Group g = a.getGroupByPDB( ResidueNumber.fromString("27"));
14+
15+
System.out.println(g);
16+
for (Atom atom : g.getAtoms()) {
17+
System.out.print(atom.toPDB());
18+
}
19+
20+
21+
int pos = 0;
22+
for (Group alt: g.getAltLocs()) {
23+
pos++;
24+
System.out.println("altLoc: " + pos + " " + alt);
25+
for (Atom atom : alt.getAtoms()) {
26+
System.out.print(atom.toPDB());
27+
}
28+
}
29+
```
30+
531
## Insertion Codes
632

33+
Insertion codes were introduced in the PDB, when people wanted to compare the "same" protein between different species. As it turned out the "same" protein was not showing exactly the same sequence in different species and in some cases insertions were found, resulting in a longer sequences. For the comparison of the proteins the numbering was considered important to be preserved. This was so one could say that for example "HIS 75" is an important residue. To make up for the mismatch in the lengths of the sequences insertion codes were introduced. As a consequence, in PDB, a particular residue is identified uniquely by three data items: chain identifier, residue number, and insertion code.
34+
35+
BioJava contains the ResidueNumber object to help with characterizing each group in a file. PDB ID 1IGY contains some extra residues around chain B position 82. BioJava can represent these like this:
36+
37+
```java
38+
Structure s1 = StructureIO.getStructure("1IGY");
39+
40+
Chain b = s1.getChainByPDB("B");
41+
42+
for (Group g : b.getAtomGroups()){
43+
System.out.println(g.getResidueNumber() + " " + g.getPDBName() + " " + g.getResidueNumber().getInsCode());
44+
}
45+
46+
```
47+
48+
This will display the following table: (residuenumber, name, insertion code)
49+
50+
```
51+
...
52+
81 HIS null
53+
82 LEU null
54+
82A SER A
55+
82B SER B
56+
82C LEU C
57+
83 THR null
58+
84 SER null
59+
...
60+
```
61+
62+
763
## Chromophores
864

9-
A [chromophore](http://en.wikipedia.org/wiki/Chromophore) is the part of a molecule responsible for its color. Several proteins, such as GFP contain a chromopohre that consists of three modified residues. BioJava represents this as a single group in terms of atoms, however as three amino acids when creating the amino acid sequences.
65+
A [chromophore](http://en.wikipedia.org/wiki/Chromophore) is the part of a molecule responsible for its color. Some proteins, such as GFP contain a chromopohre that consists of three modified residues. BioJava represents this as a single group in terms of atoms, however as three amino acids when creating the amino acid sequences.
1066

1167
```java
1268

0 commit comments

Comments
 (0)