Skip to content

Commit 9d7357a

Browse files
committed
adding a short demo for chromophores
1 parent 9811839 commit 9d7357a

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

structure/special.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Special Cases When Working with Protein Structures
2+
3+
## Alternate Locations
4+
5+
## Insertion Codes
6+
7+
## Chromophores
8+
9+
A 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.
10+
11+
```java
12+
// make sure we download chemical component definitions
13+
// which is required for correctly representing the chromophore
14+
FileParsingParameters params = new FileParsingParameters();
15+
params.setLoadChemCompInfo(true);
16+
17+
// now register the parameters in the cache
18+
AtomCache cache = new AtomCache();
19+
cache.setFileParsingParams(params);
20+
StructureIO.setAtomCache(cache);
21+
22+
23+
// request a GFP protein
24+
Structure s1 = StructureIO.getStructure("2pxw");
25+
26+
// and print out the internals
27+
System.out.println(s1.getPDBHeader().toPDB());
28+
29+
for ( Chain c : s1.getChains()) {
30+
31+
System.out.println("Chain " + c.getChainID() +
32+
" internal " + c.getInternalChainID() +
33+
" ligands " + c.getAtomLigands().size());
34+
System.out.println(" 10 20 30 40 50 60");
35+
System.out.println("1234567890123456789012345678901234567890123456789012345678901234567890");
36+
System.out.println(c.getAtomSequence());
37+
38+
int pos = 0 ;
39+
for (Group g: c.getAtomGroups()) {
40+
pos++;
41+
42+
System.out.println(pos + " " + g.getResidueNumber() + " " + g.getPDBName() + " " + g.getType() + " " + g.getChemComp().getOne_letter_code() + " " + g.getChemComp().getType() );
43+
44+
}
45+
46+
}
47+
```
48+
49+
## Microheterogeneity
50+
51+

0 commit comments

Comments
 (0)