MTStructureFactory

StructureFactory is used to create instances of class MTStructure (3.2). If automatic loading of PDB files from the mirrored directory hierarchy from RCSB (using PDBChainSaw) is envisaged, one must set the environment variable PDBDIR to point to its top directory.

Methods:

+(id)newStructure This creates an empty structure
+(id)newStructureFromPDBDirectory: (NSString*)code Read structure from directory (note that the environment variable PDBDIR must be defined)
+(id)newStructureFromPDBDirectory: (NSString*)code options: (long)opts also pass options opts
+(id)newStructureFromPDBFile: (NSString*)fn Read structure from the file system
+(id)newStructureFromPDBFile: (NSString*)fn options: (long)opts also pass options opts

where opts is the sum of the options you want to pass to the parser:

PDBPARSER_ALL_NMRMODELS 1
PDBPARSER_IGNORE_SIDECHAINS 2
PDBPARSER_IGNORE_HETEROATOMS 4
PDBPARSER_IGNORE_SOLVENT 8
PDBPARSER_IGNORE_COMPOUND 16
PDBPARSER_IGNORE_SOURCE 32
PDBPARSER_IGNORE_KEYWORDS 64
PDBPARSER_IGNORE_EXPDTA 128
PDBPARSER_IGNORE_REMARK 256
PDBPARSER_IGNORE_REVDAT 512
PDBPARSER_DONT_VERIFYCONNECTIVITY 1024
PDBPARSER_IGNORE_SEQRES 2048
PDBPARSER_ALL_ALTERNATE_ATOMS 4096
PDBPARSER_IGNORE_HYDROGENS 8192

The methods without parameter opts implicitly pass no options (0) to the parser. Turning off some options in the parser affects the speed of parsing PDB files.

Example:

strx := MTStructureFactory newStructureFromPDBDirectory: '1ABC' .     " ask the default StructureFactory for a structure, which is received in the variable strx. "

strx2 := MTStructureFactory newStructureFromPDBFile: 'test_run/1ABC.pdb' options:(1024 + 8).     " load a structure from a file on disk, do not verify connectivity of residues and ignore solvent residues. "

moltalk@moltalk.org      version of this document: V3.0