Context
The PDB file format is a fixed-column file format designed in 1970s for storing structural models of macromolecules. The format has been around for long time, has many uses, and although it has official spec the files in circulation may not strictly conform to it. It always has a list of atoms with coordinates
(the first two lines are added to stress that it's a fixed-column format, they are not part of the file):
1 2 3 4 5 6 7 8
12345678901234567890123456789012345678901234567890123456789012345678901234567890
ATOM 1 N VAL A 1 3.320 14.780 4.844 1.00 35.53 N
ATOM 2 CA VAL A 1 3.577 16.239 4.984 1.00 35.39 C
ATOM 3 C VAL A 1 4.896 16.398 5.727 1.00 30.43 C
ATOM 4 O VAL A 1 5.143 15.702 6.732 1.00 30.51 O
ATOM 5 CB VAL A 1 2.343 16.975 5.494 1.00 45.39 C
ATOM 6 CG1 VAL A 1 2.586 18.497 5.590 1.00 60.06 C
ATOM 7 CG2 VAL A 1 1.103 16.811 4.634 1.00 53.93 C
ATOM 8 N LEU A 2 5.748 17.241 5.158 1.00 28.04 N
ATOM 9 CA LEU A 2 7.116 17.471 5.661 1.00 24.31 C
ATOM 10 C LEU A 2 7.166 18.490 6.792 1.00 24.00 C
...
or, to show some RNA:
ATOM 42 N3 G B 2 9.252 12.871 -1.168 1.00 36.98 N
ATOM 43 C4 G B 2 8.424 12.964 -2.233 1.00 34.09 C
ATOM 44 P A B 3 10.376 8.321 -4.834 1.00 40.53 P
ATOM 45 OP1 A B 3 11.773 8.279 -5.364 1.00 38.97 O
ATOM 46 OP2 A B 3 9.396 7.283 -5.218 1.00 39.32 O
ATOM 47 O5' A B 3 10.429 8.473 -3.211 1.00 36.55 O
ATOM 48 C5' A B 3 11.698 8.232 -2.554 1.00 35.13 C
The Protein Data Bank -- international institution that archives and annotates structural models of biological molecules that anyone can deposit -- is now using mmCIF as the primary format. The fixed-column PDB format had inherent limitations (max. 99,999 atoms, but also it was hard to include additional info). They still generate PDB files if possible (i.e. except the largest structures), but the only format accepted now for depositions is mmCIF.
mmCIF has a rather not intuitive CIF syntax (think JSON or XML, but designed before XML),
plus ontology defined by PDBx/mmCIF dictionary (think XML Schema).
The content of mmCIF is divided into table-like categories with relations between tables (it was designed at the peak of RDMBS popularity) and is a bit harder to work with, so the old PDB format is more popular.
Sequence from PDB
The PDB format has a record called SEQRES
that explicitly lists the sequence, for example (5NEO):
SEQRES 1 A 18 G G U G G G G A C G A C C
SEQRES 2 A 18 C C A CBV C
The mmCIF format has more details:
_entity_poly.pdbx_seq_one_letter_code 'GGUGGGGACGACCCCA(CBV)C'
_entity_poly.pdbx_seq_one_letter_code_can GGUGGGGACGACCCCACC
_entity_poly.pdbx_strand_id A
loop_
_entity_poly_seq.entity_id
_entity_poly_seq.num
_entity_poly_seq.mon_id
_entity_poly_seq.hetero
1 1 G n
1 2 G n
1 3 U n
1 4 G n
1 5 G n
1 6 G n
1 7 G n
1 8 A n
1 9 C n
1 10 G n
1 11 A n
1 12 C n
1 13 C n
1 14 C n
1 15 C n
1 16 A n
1 17 CBV n
1 18 C n
The sequence is conveniently extracted for you.
Additionally, _entity_poly_seq
in mmCIF includes information about microheterogeneity, and the SEQRES record doesn't. It is relevant when the model has two alternative residues in the same place, because part of the sample had a point mutation.
PDB files that didn't come from PDB usually don't have the SEQRES record.
You may get the sequence from the list of atoms (residue names in columns 18-20), but some residues may be missing in the atom list if atomic positions could not be determined.
So it should be easy to extract the sequence either way.
For example, BioPython has module BioSeqIO with two PDB pseudo-formats:
- pdb-seqres - Reads a Protein Data Bank (PDB) file to determine the complete protein sequence as it appears in the header (no dependencies).
- pdb-atom - Uses Bio.PDB to determine the (partial) protein sequence as it appears in the structure based on the atom coordinate section of the file (requires NumPy for Bio.PDB).
I just tried BioPython 1.66 and while SeqIO.parse()
can extract protein sequence, it fails with RNA, such as the 5NEO above. Ooops.
Secondary structure restraints
We may be thinking about different restraints here. I'll write about restraints used in refinement.
The experimental data alone is normally not sufficient to refine a model, so one needs restraints that represent prior knowledge - lengths of atomic bonds, angles, planarity restraints, restraints based on local similarity to other structures that were determined from higher resolution data, etc, whatever can help to make a sensible model. Refinement programs (such as Refmac, BUSTER, Phenix.refine) try to fit the model to the data and satisfy geometrical restraints at the same time.
Macromolecular crystallographic software is quite fragmented and one normally uses several different programs in the process. It happens that the programs to generate secondary structure restraints are separate from the actual refinement programs. (Secondary structure restraints are less essential than restraints for covalent bonds). CCP4 has a program called LibG that makes DNA/RNA restraints for Refmac. Phenix has a program called phenix.secondary_structure_restraints,
or you can use a server from UCSC.
These restraints don't have a "bracket format", but they explicitly specify expected distances and angles between atoms. For example (for phenix.refine):
bond {
action = *add
atom_selection_1 = chain A and resid 1 and name O6
atom_selection_2 = chain A and resid 18 and name N4
distance_ideal = 2.91
sigma = 0.1
}
or (for Refmac):
exte dist first chain A resi 16 ins . atom N6 second chain A resi 3 ins . atom O4 value 2.94 sigma 0.15 type 1
exte dist first chain A resi 16 ins . atom N1 second chain A resi 3 ins . atom N3 value 2.84 sigma 0.1 type 1
exte torsion first chain A resi 16 ins . atom C2 second chain A resi 16 ins . atom N1 third chain A resi 3 ins . atom N3 fourth chain A resi 3 ins . atom C4 value 180 sigma 15 type 1