Loading...
Searching...
No Matches
chains.cpp File Reference
`#include <openbabel/babelconfig.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <stdio.h>`
`#include <ctype.h>`
`#include <map>`
`#include <openbabel/mol.h>`
`#include <openbabel/atom.h>`
`#include <openbabel/bond.h>`
`#include <openbabel/chains.h>`
`#include <openbabel/oberror.h>`
`#include <openbabel/obiter.h>`
`#include <openbabel/elements.h>`

## Namespaces

namespace | OpenBabel

## Macros

#define | RESIDMIN 4
#define | RESIDMAX 64
#define | ATOMMINAMINO 4
#define | ATOMMINNUCLEIC 50
#define | MAXPEPTIDE 11
#define | MAXNUCLEIC 15
#define | AMINOMAX 21
#define | NUCLEOMAX 6
#define | STACKSIZE 20
#define | AI_N 0
#define | AI_CA 1
#define | AI_C 2
#define | AI_O 3
#define | AI_OXT 37
#define | AI_P 38
#define | AI_O1P 39
#define | AI_O2P 40
#define | AI_O5 41
#define | AI_C5 42
#define | AI_C4 43
#define | AI_O4 44
#define | AI_C3 45
#define | AI_O3 46
#define | AI_C2 47
#define | AI_O2 48
#define | AI_C1 49
#define | BitN 0x0001
#define | BitNTer 0x0002
#define | BitNPro 0x0004
#define | BitNPT 0x0008
#define | BitCA 0x0010
#define | BitCAGly 0x0020
#define | BitC 0x0100
#define | BitCTer 0x0200
#define | BitCOXT 0x0400
#define | BitO 0x1000
#define | BitOXT 0x2000
#define | BitNAll 0x000F
#define | BitCAAll 0x0030
#define | BitCAll 0x0700
#define | BitOAll 0x3000
#define | BitP 0x0001
#define | BitPTer 0x0002
#define | BitOP 0x0004
#define | BitO5 0x0008
#define | BitO5Ter 0x0010
#define | BitC5 0x0020
#define | BitC4 0x0040
#define | BitO4 0x0080
#define | BitC3 0x0100
#define | BitO3 0x0200
#define | BitO3Ter 0x0400
#define | BitC2RNA 0x0800
#define | BitC2DNA 0x1000
#define | BitO2 0x2000
#define | BitC1 0x4000
#define | BitPAll 0x0003
#define | Bit05All 0x0018
#define | BitO3All 0x0600
#define | BitC2All 0x1800
#define | BC_ASSIGN 0x01
#define | BC_COUNT 0x02
#define | BC_ELEM 0x03
#define | BC_EVAL 0x04
#define | BC_IDENT 0x05
#define | BC_LOCAL 0x06
#define | BF_SINGLE 0x01
#define | BF_DOUBLE 0x02
#define | BF_TRIPLE 0x04
#define | BF_AROMATIC 0x08
#define | ATOMMAX 68

## Typedefs

typedef union OpenBabel::_ByteCode | ByteCode

## Functions

static ByteCode * | AllocateByteCode (int type)
static void | DeleteByteCode (ByteCode *node)
static void | FatalMemoryError (void)
void | GenerateByteCodes (ByteCode **node, int resid, int curr, int prev, int bond)

## Variables

static char | ChainsResName [RESIDMAX][4]
static Template | Peptide [MAXPEPTIDE]
static Template | Nucleotide [MAXNUCLEIC]
static char | ChainsAtomName [ATOMMAX][4]
static ResidType | AminoAcids [AMINOMAX]
static ResidType | Nucleotides [NUCLEOMAX]
static MonoAtomType | MonoAtom [MaxMonoAtom]
static MonoBondType | MonoBond [MaxMonoBond]
static int | MonoAtomCount
static int | MonoBondCount
static StackType | Stack [STACKSIZE]
static int | StackPtr
static int | AtomIndex
static int | BondIndex
static bool | StrictFlag = false

## Detailed Description

Parse for macromolecule chains and residues.

## Macro Definition Documentation

## RESIDMIN

#define RESIDMIN 4

The first available index for actual residues 0, 1, 2 reserved for UNK, HOH, UNL

Referenced by OBChainsParser::OBChainsParser().

## RESIDMAX

#define RESIDMAX 64

The maximum number of residue IDs for this code.

## ATOMMINAMINO

#define ATOMMINAMINO 4

Referenced by OpenBabel::GenerateByteCodes().

## ATOMMINNUCLEIC

#define ATOMMINNUCLEIC 50

## MAXPEPTIDE

#define MAXPEPTIDE 11

## MAXNUCLEIC

#define MAXNUCLEIC 15

## AMINOMAX

#define AMINOMAX 21

The number of amino acids recognized by this code Currently: ILE, VAL, ALA, ASN, ASP, ARG, CYS, GLN, GLU GLY, HIS, HYP, LEU, LYS, MET, PHE, PRO, SER, THR, TRP, TYR

Referenced by OBChainsParser::OBChainsParser().

## NUCLEOMAX

#define NUCLEOMAX 6

The number of nucleic acids recognized by this code Currently A, C, T, G, U, I

Referenced by OBChainsParser::OBChainsParser().

## STACKSIZE

#define STACKSIZE 20

## AI_N

#define AI_N 0

Referenced by OBChainsParser::PerceiveChains().

## AI_CA

#define AI_CA 1

## AI_C

#define AI_C 2

Referenced by OBChainsParser::PerceiveChains().

## AI_O

#define AI_O 3

## AI_OXT

#define AI_OXT 37

## AI_P

#define AI_P 38

## AI_O1P

#define AI_O1P 39

## AI_O2P

#define AI_O2P 40

## AI_O5

#define AI_O5 41

## AI_C5

#define AI_C5 42

## AI_C4

#define AI_C4 43

## AI_O4

#define AI_O4 44

## AI_C3

#define AI_C3 45

## AI_O3

#define AI_O3 46

## AI_C2

#define AI_C2 47

## AI_O2

#define AI_O2 48

## AI_C1

#define AI_C1 49

## BitN

#define BitN 0x0001

## BitNTer

#define BitNTer 0x0002

## BitNPro

#define BitNPro 0x0004

## BitNPT

#define BitNPT 0x0008

## BitCA

#define BitCA 0x0010

## BitCAGly

#define BitCAGly 0x0020

## BitC

#define BitC 0x0100

## BitCTer

#define BitCTer 0x0200

## BitCOXT

#define BitCOXT 0x0400

## BitO

#define BitO 0x1000

## BitOXT

#define BitOXT 0x2000

## BitNAll

#define BitNAll 0x000F

## BitCAAll

#define BitCAAll 0x0030

## BitCAll

#define BitCAll 0x0700

## BitOAll

#define BitOAll 0x3000

## BitP

#define BitP 0x0001

## BitPTer

#define BitPTer 0x0002

## BitOP

#define BitOP 0x0004

## BitO5

#define BitO5 0x0008

## BitO5Ter

#define BitO5Ter 0x0010

## BitC5

#define BitC5 0x0020

## BitC4

#define BitC4 0x0040

## BitO4

#define BitO4 0x0080

## BitC3

#define BitC3 0x0100

## BitO3

#define BitO3 0x0200

## BitO3Ter

#define BitO3Ter 0x0400

## BitC2RNA

#define BitC2RNA 0x0800

## BitC2DNA

#define BitC2DNA 0x1000

## BitO2

#define BitO2 0x2000

## BitC1

#define BitC1 0x4000

## BitPAll

#define BitPAll 0x0003

## Bit05All

#define Bit05All 0x0018

## BitO3All

#define BitO3All 0x0600

## BitC2All

#define BitC2All 0x1800

## BC_ASSIGN

#define BC_ASSIGN 0x01

Referenced by OpenBabel::DeleteByteCode(), and OpenBabel::GenerateByteCodes().

## BC_COUNT

#define BC_COUNT 0x02

Referenced by OpenBabel::DeleteByteCode(), and OpenBabel::GenerateByteCodes().

## BC_ELEM

#define BC_ELEM 0x03

Referenced by OpenBabel::DeleteByteCode(), and OpenBabel::GenerateByteCodes().

## BC_EVAL

#define BC_EVAL 0x04

Referenced by OpenBabel::DeleteByteCode(), and OpenBabel::GenerateByteCodes().

## BC_IDENT

#define BC_IDENT 0x05

Referenced by OpenBabel::DeleteByteCode(), and OpenBabel::GenerateByteCodes().

## BC_LOCAL

#define BC_LOCAL 0x06

Referenced by OpenBabel::DeleteByteCode(), and OpenBabel::GenerateByteCodes().

## BF_SINGLE

#define BF_SINGLE 0x01

## BF_DOUBLE

#define BF_DOUBLE 0x02

## BF_TRIPLE

#define BF_TRIPLE 0x04

## BF_AROMATIC

#define BF_AROMATIC 0x08

## ATOMMAX

#define ATOMMAX 68

The number of PDB atom type names recognized by this code.

## Variable Documentation

## ChainsResName

char ChainsResName[RESIDMAX][4]

static

Initial value:
= {
"UNK",
"HOH",
"UNL",
"ACE"
}

An index of the residue names perceived during a run 0, 1, and 2 reserved for UNK, HOH, LIG

Referenced by OpenBabel::GenerateByteCodes(), and OBChainsParser::OBChainsParser().