ajdomain.c


Section: Constructors

These constructors return a pointer to a new instance of an object.

Functions:
ajCathReadAllNewReads a DCF file (domain classification file) for CATH domains. This file is in DCF format (see documentation for DOMAINATRIX "cathparse" application) and creates an AJAX List of AJAX CATH objects for the entire content.
ajCathReadAllRawNewReads the CATH parsable files (dir.cla.scop.txt & dir.des.scop.txt) and writes an AJAX List of AJAX CATH objects.
ajCathReadCNewRead a Cath object from a DCF file (domain classification file) in DCF format (see documentation for DOMAINATRIX "cathparse" application).
ajCathReadNewRead a Cath object from a DCF file (domain classification file) which is in DCF format (see documentation for DOMAINATRIX "cathparse" application).
ajDomainReadAllNewReads the DCF file (domain classification file; see documentation for DOMAINATRIX "scopparse" application) and creates a list of Domain objects for the entire content.
ajScopReadAllNewReads the DCF file (domain classification file) of SCOP domains. The DCF file is in DCF format (see documentation for DOMAINATRIX "scopparse" application). The function creates a list of cop objects for the entire content.
ajScopReadAllRawNewReads the SCOP parsable files (dir.cla.scop.txt & dir.des.scop.txt) and creates a list of Scop objects.
ajCathNewCath object constructor. Fore-knowledge of the number of chain segments the domain is comprised of is required.
ajDomainNewDomain object constructor. Fore-knowledge of the number of chains (SCOP domains) or chain segments (CATH domains) the domain is comprised of is required. This is normally called by the ajDomainReadCNew / ajDomainReadNew functions.
ajScopNewScop object constructor. Fore-knowledge of the number of chains is required. This is normally called by the ajScopReadCNew / ajScopReadNew functions.
ajDomainReadNewRead a Domain object from a DCF file (domain classification file - see documentation for DOMAINATRIX "scopparse" application).
ajScopReadNewRead a Scop object from a DCF file (domain classification file). The DCF file is in DCF format (see documentation for DOMAINATRIX "scopparse" application).
ajDomainReadCNewRead a Domain object from a DCF (domain classification file; see documentation for DOMAINATRIX "scopparse" application).
ajScopReadCNewRead a Scop object from a DCF file (domain classification file) in DCF format (see documentation for DOMAINATRIX "scopparse" application).


Function ajCathReadAllNew

Reads a DCF file (domain classification file) for CATH domains. This file is in DCF format (see documentation for DOMAINATRIX "cathparse" application) and creates an AJAX List of AJAX CATH objects for the entire content.

Prototype

AjPList ajCathReadAllNew (
      AjPFile inf
);

TypeNameRead/WriteDescription
AjPFileinfModifyPointer to CATH classification file
AjPList RETURNAJAX List of AJAX CATH objects

From EMBOSS 2.9.0


Function ajCathReadAllRawNew

Reads the CATH parsable files (dir.cla.scop.txt & dir.des.scop.txt) and writes an AJAX List of AJAX CATH objects.

Prototype

AjPList ajCathReadAllRawNew (
      AjPFile cathf,
      AjPFile domf,
      AjPFile namesf,
      AjPFile flog
);

TypeNameRead/WriteDescription
AjPFilecathfModifyCath class file
AjPFiledomfModifyCath domain file
AjPFilenamesfModifyOutput file
AjPFileflogModifyLog file
AjPList RETURNAJAX List of AJAX CATH objects

From EMBOSS 2.9.0


Function ajCathReadCNew

Read a Cath object from a DCF file (domain classification file) in DCF format (see documentation for DOMAINATRIX "cathparse" application).

Prototype

AjPCath ajCathReadCNew (
      AjPFile inf,
      const char* entry
);

TypeNameRead/WriteDescription
AjPFileinfModifyAJAX Input file stream
const char*entryInputCATH id of entry to retrieve (or "*" for next domain in file).
AjPCath RETURNCath object.

From EMBOSS 2.9.0


Function ajCathReadNew

Read a Cath object from a DCF file (domain classification file) which is in DCF format (see documentation for DOMAINATRIX "cathparse" application).

Prototype

AjPCath ajCathReadNew (
      AjPFile inf,
      const AjPStr entry
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream
const AjPStrentryInputCATH id of entry to retrieve (or "*" for next domain in file).
AjPCath RETURNCath object.

From EMBOSS 2.9.0


Function ajDomainReadAllNew

Reads the DCF file (domain classification file; see documentation for DOMAINATRIX "scopparse" application) and creates a list of Domain objects for the entire content.

Prototype

AjPList ajDomainReadAllNew (
      AjPFile inf
);

TypeNameRead/WriteDescription
AjPFileinfModifyPointer to DOMAIN classification file
AjPList RETURNAJAX List of AJAX Domain objects or NULL (file read problem)

From EMBOSS 3.0.0


Function ajScopReadAllNew

Reads the DCF file (domain classification file) of SCOP domains. The DCF file is in DCF format (see documentation for DOMAINATRIX "scopparse" application). The function creates a list of cop objects for the entire content.

Prototype

AjPList ajScopReadAllNew (
      AjPFile inf
);

TypeNameRead/WriteDescription
AjPFileinfModifyPointer to SCOP classification file
AjPList RETURNList of scop objects or NULL (file read problem).

From EMBOSS 2.9.0


Function ajScopReadAllRawNew

Reads the SCOP parsable files (dir.cla.scop.txt & dir.des.scop.txt) and creates a list of Scop objects.

Prototype

AjPList ajScopReadAllRawNew (
      AjPFile claf,
      AjPFile desf,
      AjBool omit
);

TypeNameRead/WriteDescription
AjPFileclafModifyScop class file
AjPFiledesfModifyScop description file
AjBoolomitInputTrue if domains of 1 chain only are output
AjPList RETURNList of Scop objects.

From EMBOSS 2.9.0


Function ajCathNew

Cath object constructor. Fore-knowledge of the number of chain segments the domain is comprised of is required.

Prototype

AjPCath ajCathNew (
      ajuint n
);

TypeNameRead/WriteDescription
ajuintnInputNo. of chain segments
AjPCath RETURNPointer to a Cath object

From EMBOSS 2.9.0


Function ajDomainNew

Domain object constructor. Fore-knowledge of the number of chains (SCOP domains) or chain segments (CATH domains) the domain is comprised of is required. This is normally called by the ajDomainReadCNew / ajDomainReadNew functions.

Prototype

AjPDomain ajDomainNew (
      ajuint n,
      AjEDomainType type
);

TypeNameRead/WriteDescription
ajuintnInputNumber of chains (SCOP) or chain segments (CATH)
AjEDomainTypetypeModifyAJAX Domain Type enuimeration
AjPDomain RETURNPointer to a Domain object

From EMBOSS 3.0.0


Function ajScopNew

Scop object constructor. Fore-knowledge of the number of chains is required. This is normally called by the ajScopReadCNew / ajScopReadNew functions.

Prototype

AjPScop ajScopNew (
      ajuint chains
);

TypeNameRead/WriteDescription
ajuintchainsInputNumber of chains
AjPScop RETURNPointer to a Scop object

From EMBOSS 1.8.0


Function ajDomainReadNew

Read a Domain object from a DCF file (domain classification file - see documentation for DOMAINATRIX "scopparse" application).

Prototype

AjPDomain ajDomainReadNew (
      AjPFile inf,
      const AjPStr entry
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream.
const AjPStrentryInputDomain id of domain to read (or "*" for next domain in file).
AjPDomain RETURNDomain object.

From EMBOSS 3.0.0


Function ajScopReadNew

Read a Scop object from a DCF file (domain classification file). The DCF file is in DCF format (see documentation for DOMAINATRIX "scopparse" application).

Prototype

AjPScop ajScopReadNew (
      AjPFile inf,
      const AjPStr entry
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream.
const AjPStrentryInputSCOP id of domain to read (or "*" for next domain in file).
AjPScop RETURNScop object.

From EMBOSS 2.9.0


Function ajDomainReadCNew

Read a Domain object from a DCF (domain classification file; see documentation for DOMAINATRIX "scopparse" application).

Prototype

AjPDomain ajDomainReadCNew (
      AjPFile inf,
      const char* entry,
      AjEDomainType dtype
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream
const char*entryInputDomain id of domain to parse
AjEDomainTypedtypeModifyAJAX Domain Type enumeration in the DCF file, or ajEDomainTypeNULL if not sure.
AjPDomain RETURNDomain object or NULL (file read problem).

From EMBOSS 3.0.0


Function ajScopReadCNew

Read a Scop object from a DCF file (domain classification file) in DCF format (see documentation for DOMAINATRIX "scopparse" application).

Prototype

AjPScop ajScopReadCNew (
      AjPFile inf,
      const char* entry
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream
const char*entryInputSCOP id of domain to parse
AjPScop RETURNScop object or NULL (file read problem).

From EMBOSS 2.9.0


Section: Structure Destructors

These destructors functions receive the address of the instance to be deleted. The original pointer is set to NULL so is ready for re-use.

Functions:
ajDomainDelDestructor for an AJAX Domain object.
ajScopDelDestructor for an AJAX SCOP object.
ajCathDelDestructor for an AJAX CATH object.


Function ajDomainDel

Destructor for an AJAX Domain object.

Prototype

void ajDomainDel (
      AjPDomain* Pdomain
);

TypeNameRead/WriteDescription
AjPDomain*PdomainDeleteAJAX Domain address
void RETURN

From EMBOSS 3.0.0


Function ajScopDel

Destructor for an AJAX SCOP object.

Prototype

void ajScopDel (
      AjPScop* Pscop
);

TypeNameRead/WriteDescription
AjPScop*PscopDeleteAJAX SCOP address
void RETURN

From EMBOSS 1.8.0


Function ajCathDel

Destructor for an AJAX CATH object.

Prototype

void ajCathDel (
      AjPCath* Pcath
);

TypeNameRead/WriteDescription
AjPCath*PcathDeleteAJAX CATH address
void RETURN

From EMBOSS 2.9.0


Section: Assignments

These functions overwrite the instance provided as the first argument A NULL value is always acceptable so these functions are often used to create a new instance by assignment.

Functions:
ajDomainCopyCopies the contents from one AJAX Domain object to another.
ajCathCopyCopies the contents from one AJAX CATH object to another.
ajScopCopyCopies the contents from one AJAX SCOP object to another.


Function ajDomainCopy

Copies the contents from one AJAX Domain object to another.

Prototype

AjBool ajDomainCopy (
      AjPDomain* Pto,
      const AjPDomain from
);

TypeNameRead/WriteDescription
AjPDomain*PtoOutputAJAX Domain address
const AjPDomainfromInputAJAX Domain
AjBool RETURNTrue if copy was successful.

From EMBOSS 3.0.0


Function ajCathCopy

Copies the contents from one AJAX CATH object to another.

Prototype

AjBool ajCathCopy (
      AjPCath* Pto,
      const AjPCath from
);

TypeNameRead/WriteDescription
AjPCath*PtoOutputAJAX Cath address
const AjPCathfromInputAJAX Cath
AjBool RETURNTrue if copy was successful.

From EMBOSS 3.0.0


Function ajScopCopy

Copies the contents from one AJAX SCOP object to another.

Prototype

AjBool ajScopCopy (
      AjPScop* Pto,
      const AjPScop from
);

TypeNameRead/WriteDescription
AjPScop*PtoOutputAJAX SCOP address
const AjPScopfromInputAJAX SCOP
AjBool RETURNTrue if copy was successful.

From EMBOSS 2.9.0


Section: Operators

These functions use the contents of an instance but do not make any changes.

Functions:
ajScopMatchSunidFunction to compare AJAX SCOP objects by Sunid_Family member.
ajScopMatchScopidFunction to comapre AJAX SCOP objects by Entry member.
ajScopMatchPdbIdFunction to compare AJAX SCOP objects by Pdb member.
ajCathMatchPdbIdFunction to compare AJAX CATH objects by Pdb member.


Function ajScopMatchSunid

Function to compare AJAX SCOP objects by Sunid_Family member.

Prototype

ajint ajScopMatchSunid (
      const void* item1,
      const void* item2
);

TypeNameRead/WriteDescription
const void*item1InputAJAX SCOP address 1
const void*item2InputAJAX SCOP address 2
ajint RETURN-1 if Start1 should sort before Start2, +1 if the Start2 should sort first. 0 if they are identical.

From EMBOSS 2.9.0


Function ajScopMatchScopid

Function to comapre AJAX SCOP objects by Entry member.

Prototype

ajint ajScopMatchScopid (
      const void* item1,
      const void* item2
);

TypeNameRead/WriteDescription
const void*item1InputAJAX SCOP address 1
const void*item2InputAJAX SCOP address 2
ajint RETURN-1 if Entry1 should sort before Entry2, +1 if the Entry2 should sort first. 0 if they are identical in length and content.

From EMBOSS 2.9.0


Function ajScopMatchPdbId

Function to compare AJAX SCOP objects by Pdb member.

Prototype

ajint ajScopMatchPdbId (
      const void* item1,
      const void* item2
);

TypeNameRead/WriteDescription
const void*item1InputAJAX SCOP address 1
const void*item2InputAJAX SCOP address 2
ajint RETURN-1 if Pdb1 should sort before Pdb2, +1 if the Pdb2 should sort first. 0 if they are identical in length and content.

From EMBOSS 2.9.0


Function ajCathMatchPdbId

Function to compare AJAX CATH objects by Pdb member.

Prototype

ajint ajCathMatchPdbId (
      const void* item1,
      const void* item2
);

TypeNameRead/WriteDescription
const void*item1InputAJAX CATH address 1
const void*item2InputAJAX CATH address 2
ajint RETURN-1 if Pdb1 should sort before Pdb2, +1 if the Pdb2 should sort first. 0 if they are identical in length and content.

From EMBOSS 2.9.0


Section: Reporters

These functions return the contents of an instance but do not make any changes.

Functions:
ajDomainGetIdReturns domain id, either DomainID element (Cath object) or Entry (Scop object).
ajDomainGetSeqPdbReturns the pdb sequence from an AJAX Domain object.
ajDomainGetSeqSprReturns the swissprot sequence from an AJAX Domain object.
ajDomainGetPdbReturns the Pdb element from an AJAX Domain object.
ajDomainGetAccReturns the Acc element from a Domain object.
ajDomainGetSprReturns the Spr element from an AJAX Domain object.
ajDomainGetNReturns no. chains or chain segments in a domain, either NSegment element (Cath domains) or N element (Scop domains).
ajScopArrFindScopidPerforms a binary search for a SCOP domain id over an array of Scop structures (which of course must first have been sorted). This is a case-insensitive search.
ajScopArrFindSunidPerforms a binary search for a SCOP sunid over an array of Scop objects (which of course must first have been sorted). This is a case-insensitive search.
ajScopArrFindPdbidPerforms a binary search for a SCOP domain id over an array of Scop objects (which of course must first have been sorted). This is a case-insensitive search.
ajCathArrFindPdbidPerforms a binary search for a CATH domain id over an array of Cath structures (which of course must first have been sorted). This is a case-insensitive search.


Function ajDomainGetId

Returns domain id, either DomainID element (Cath object) or Entry (Scop object).

Prototype

AjPStr ajDomainGetId (
      const AjPDomain domain
);

TypeNameRead/WriteDescription
const AjPDomaindomainInputAJAX Domain
AjPStr RETURNDomainID, Entry or NULL on error

From EMBOSS 3.0.0


Function ajDomainGetSeqPdb

Returns the pdb sequence from an AJAX Domain object.

Prototype

AjPStr ajDomainGetSeqPdb (
      const AjPDomain domain
);

TypeNameRead/WriteDescription
const AjPDomaindomainInputAJAX Domain
AjPStr RETURNPDB Sequence or NULL on error

From EMBOSS 3.0.0


Function ajDomainGetSeqSpr

Returns the swissprot sequence from an AJAX Domain object.

Prototype

AjPStr ajDomainGetSeqSpr (
      const AjPDomain domain
);

TypeNameRead/WriteDescription
const AjPDomaindomainInputAJAX Domain
AjPStr RETURNSwiss-Prot sequence or NULL on error

From EMBOSS 3.0.0


Function ajDomainGetPdb

Returns the Pdb element from an AJAX Domain object.

Prototype

AjPStr ajDomainGetPdb (
      const AjPDomain domain
);

TypeNameRead/WriteDescription
const AjPDomaindomainInputAJAX Domain
AjPStr RETURNPdb or NULL on error.

From EMBOSS 3.0.0


Function ajDomainGetAcc

Returns the Acc element from a Domain object.

Prototype

AjPStr ajDomainGetAcc (
      const AjPDomain domain
);

TypeNameRead/WriteDescription
const AjPDomaindomainInputAJAX Domain
AjPStr RETURNAcc or NULL on error

From EMBOSS 3.0.0


Function ajDomainGetSpr

Returns the Spr element from an AJAX Domain object.

Prototype

AjPStr ajDomainGetSpr (
      const AjPDomain domain
);

TypeNameRead/WriteDescription
const AjPDomaindomainInputAJAX Domain
AjPStr RETURNSpr or NULL on error

From EMBOSS 3.0.0


Function ajDomainGetN

Returns no. chains or chain segments in a domain, either NSegment element (Cath domains) or N element (Scop domains).

Prototype

ajint ajDomainGetN (
      const AjPDomain domain
);

TypeNameRead/WriteDescription
const AjPDomaindomainInputAJAX Domain
ajint RETURNOr -1 on error.

From EMBOSS 3.0.0


Function ajScopArrFindScopid

Performs a binary search for a SCOP domain id over an array of Scop structures (which of course must first have been sorted). This is a case-insensitive search.

Prototype

ajint ajScopArrFindScopid (
      AjPScop const* array,
      ajint size,
      const AjPStr identifier
);

TypeNameRead/WriteDescription
AjPScop const*arrayInputArray of AJAX SCOP objects
ajintsizeInputSize of array
const AjPStridentifierInputSearch term
ajint RETURNIndex of first Scop object found with a SCOP domain id matching id, or -1 if id is not found.

From EMBOSS 2.9.0


Function ajScopArrFindSunid

Performs a binary search for a SCOP sunid over an array of Scop objects (which of course must first have been sorted). This is a case-insensitive search.

Prototype

ajint ajScopArrFindSunid (
      AjPScop const* array,
      ajint size,
      ajint identifier
);

TypeNameRead/WriteDescription
AjPScop const*arrayInputArray of AJAX SCOP objects
ajintsizeInputSize of array
ajintidentifierInputSearch term
ajint RETURNIndex of first Scop object found with an PDB code matching id, or -1 if id is not found.

From EMBOSS 2.9.0


Function ajScopArrFindPdbid

Performs a binary search for a SCOP domain id over an array of Scop objects (which of course must first have been sorted). This is a case-insensitive search.

Prototype

ajint ajScopArrFindPdbid (
      AjPScop const* array,
      ajint size,
      const AjPStr identifier
);

TypeNameRead/WriteDescription
AjPScop const*arrayInputArray of AJAX SCOP objects
ajintsizeInputSize of array
const AjPStridentifierInputSearch term
ajint RETURNIndex of first Scop object found with a PDB code matching id, or -1 if id is not found.

From EMBOSS 2.9.0


Function ajCathArrFindPdbid

Performs a binary search for a CATH domain id over an array of Cath structures (which of course must first have been sorted). This is a case-insensitive search.

Prototype

ajint ajCathArrFindPdbid (
      AjPCath const* array,
      ajint size,
      const AjPStr identifier
);

TypeNameRead/WriteDescription
AjPCath const*arrayInputArray of AjPCath objects
ajintsizeInputSize of array
const AjPStridentifierInputSearch term
ajint RETURNIndex of first Cath object found with a PDB code matching id, or -1 if id is not found.

From EMBOSS 2.9.0


Section: Input and Output

These functions use the contents of an instance but do not make any changes.

Functions:
ajPdbWriteDomainWrites a clean coordinate file for a SCOP domain. Where coordinates for multiple models (e.g. NMR structures) are given, data for model 1 are written. In the clean file, the coordinates are presented as belonging to a single chain regardless of how many chains the domain comprised. Coordinates for heterogens are NOT written to file.
ajCathWriteWrite contents of an AJAX CATH object to an output DCF file (domain classification file) in DCF format (see documentation for DOMAINATRIX "cathparse" application).
ajDomainWriteWrite contents of an AJAX Domain object to an output file in DCF format (see documentation for DOMAINATRIX "scopparse" application).
ajScopWriteWrite contents of an AJAX SCOP object to a DCF file (domain classification file). The DCF file uses DCF format (see documentation for DOMAINATRIX "scopparse" application).


Function ajPdbWriteDomain

Writes a clean coordinate file for a SCOP domain. Where coordinates for multiple models (e.g. NMR structures) are given, data for model 1 are written. In the clean file, the coordinates are presented as belonging to a single chain regardless of how many chains the domain comprised. Coordinates for heterogens are NOT written to file.

Prototype

AjBool ajPdbWriteDomain (
      AjPFile outf,
      const AjPPdb pdb,
      const AjPScop scop,
      AjPFile errf
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file stream
const AjPPdbpdbInputPdb object
const AjPScopscopInputScop object
AjPFileerrfModifyOutput file stream for error messages
AjBool RETURNTrue on success

From EMBOSS 1.9.0


Function ajCathWrite

Write contents of an AJAX CATH object to an output DCF file (domain classification file) in DCF format (see documentation for DOMAINATRIX "cathparse" application).

Prototype

AjBool ajCathWrite (
      AjPFile outf,
      const AjPCath cath
);

TypeNameRead/WriteDescription
AjPFileoutfModifyAJAX Output file stream
const AjPCathcathInputAJAX CATH
AjBool RETURNTrue if file was written ok.

From EMBOSS 2.9.0


Function ajDomainWrite

Write contents of an AJAX Domain object to an output file in DCF format (see documentation for DOMAINATRIX "scopparse" application).

Prototype

AjBool ajDomainWrite (
      AjPFile outf,
      const AjPDomain domain
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file stream
const AjPDomaindomainInputAJAX Domain
AjBool RETURNTrue if file was written ok.

From EMBOSS 3.0.0


Function ajScopWrite

Write contents of an AJAX SCOP object to a DCF file (domain classification file). The DCF file uses DCF format (see documentation for DOMAINATRIX "scopparse" application).

Prototype

AjBool ajScopWrite (
      AjPFile outf,
      const AjPScop scop
);

TypeNameRead/WriteDescription
AjPFileoutfModifyOutput file stream
const AjPScopscopInputAJAX SCOP
AjBool RETURNTrue if file was written ok.

From EMBOSS 1.8.0


Section: Miscellaneous

These functions may have diverse functions that do not fit into the other categories.

Functions:
ajDomainDCFTypeReads a DCF file (domain classification file; see documentation for DOMAINATRIX "scopparse" application) and ascertains the type of domains (ajEDomainTypeSCOP or ajEDomainTypeCATH) within.
ajDomainExitCleanup of Domain function internals.
ajDomainDummyFunctionDummy function to catch all unused functions defined in the ajdomain source file.


Function ajDomainDCFType

Reads a DCF file (domain classification file; see documentation for DOMAINATRIX "scopparse" application) and ascertains the type of domains (ajEDomainTypeSCOP or ajEDomainTypeCATH) within.

Prototype

AjEDomainType ajDomainDCFType (
      AjPFile inf
);

TypeNameRead/WriteDescription
AjPFileinfModifyInput file stream
AjEDomainType RETURNAJAX Domain Type enumeration ajEDomainTypeSCOP, ajEDomainTypeCATH or ajEDomainTypeNULL (error) as appropriate.

From EMBOSS 3.0.0


Function ajDomainExit

Cleanup of Domain function internals.

Prototype

void ajDomainExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 6.1.0


Function ajDomainDummyFunction

Dummy function to catch all unused functions defined in the ajdomain source file.

Prototype

void ajDomainDummyFunction (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 2.9.0