Go to the source code of this file.
Data Structures | |
struct | A_NUM_LISTS |
NUM_LISTS - Dynamically growing array of numeric lists. More... | |
struct | tagINT_ARRAY |
INT_ARRAY - Dynamically growing array of int. More... | |
struct | A_MOL_FMT_SGROUP |
Data structure for Sgroup data (substance group data). More... | |
struct | A_MOL_FMT_SGROUPS |
MOL_FMT_SGROUPS is a dynamically growing array of pointers to MOL_FMT_SGROUP objects. More... | |
struct | A_MOL_FMT_HEADER_BLOCK |
Data structure for MOL file header block (3 lines). More... | |
struct | A_MOL_FMT_ATOM |
Data structure for atom representation in the MOL format. More... | |
struct | A_MOL_FMT_BOND |
Data structure for bond representation in the MOL format. More... | |
struct | A_MOL_FMT_v3000 |
Data structure for V3000 representation in the MOL format. More... | |
struct | A_MOL_FMT_CTAB |
Connection table data structure. More... | |
struct | A_MOL_FMT_DATA |
Data structure for a MOL file. More... | |
Typedefs | |
typedef signed char | S_CHAR |
typedef unsigned char | U_CHAR |
typedef struct A_NUM_LISTS | NUM_LISTS |
NUM_LISTS - Dynamically growing array of numeric lists. | |
typedef struct tagINT_ARRAY | INT_ARRAY |
INT_ARRAY - Dynamically growing array of int. | |
typedef struct A_MOL_FMT_SGROUP | MOL_FMT_SGROUP |
Data structure for Sgroup data (substance group data). | |
typedef struct A_MOL_FMT_SGROUPS | MOL_FMT_SGROUPS |
MOL_FMT_SGROUPS is a dynamically growing array of pointers to MOL_FMT_SGROUP objects. | |
typedef struct A_MOL_FMT_HEADER_BLOCK | MOL_FMT_HEADER_BLOCK |
Data structure for MOL file header block (3 lines). | |
typedef struct A_MOL_FMT_ATOM | MOL_FMT_ATOM |
Data structure for atom representation in the MOL format. | |
typedef struct A_MOL_FMT_BOND | MOL_FMT_BOND |
Data structure for bond representation in the MOL format. | |
typedef struct A_MOL_FMT_v3000 | MOL_FMT_v3000 |
Data structure for V3000 representation in the MOL format. | |
typedef struct A_MOL_FMT_CTAB | MOL_FMT_CTAB |
Connection table data structure. | |
typedef struct A_MOL_FMT_DATA | MOL_FMT_DATA |
Data structure for a MOL file. | |
Functions | |
int | NumLists_Alloc (NUM_LISTS *num_lists, int nlists) |
Allocates memory for a specified number of numeric lists. | |
int | NumLists_ReAlloc (NUM_LISTS *num_lists) |
Reallocates memory for the numeric lists. | |
int | NumLists_Append (NUM_LISTS *num_lists, int *list) |
Push new item to the end of array. | |
void | NumLists_Free (NUM_LISTS *num_lists) |
Frees the memory allocated for the numeric list. | |
int | IntArray_Alloc (INT_ARRAY *items, int nitems) |
Initializes an INT_ARRAY structure. | |
int | IntArray_ReAlloc (INT_ARRAY *items) |
Reallocates memory for the INT_ARRAY structure. | |
int | IntArray_Append (INT_ARRAY *items, int new_item) |
Appends a new item to the INT_ARRAY structure. | |
int | IntArray_AppendIfAbsent (INT_ARRAY *items, int new_item) |
Appends a new item to the INT_ARRAY structure if it is not already present. | |
void | IntArray_Reset (INT_ARRAY *items) |
Resets the INT_ARRAY structure to its initial state. | |
void | IntArray_Free (INT_ARRAY *items) |
Frees the memory allocated for the INT_ARRAY structure. | |
void | IntArray_DebugPrint (INT_ARRAY *items) |
Prints the contents of the INT_ARRAY structure for debugging purposes. | |
int | MolFmtSgroup_Create (MOL_FMT_SGROUP **sgroup, int id, int type) |
Allocate new array Sgroup. | |
void | MolFmtSgroup_Free (MOL_FMT_SGROUP *sgroup) |
Frees the memory allocated for the Sgroup. | |
int | MolFmtSgroups_Alloc (MOL_FMT_SGROUPS *items, int nitems) |
Allocates memory for a specified number of Sgroup objects. | |
int | MolFmtSgroups_ReAlloc (MOL_FMT_SGROUPS *items) |
Expand array of Sgroups. | |
int | MolFmtSgroups_Append (MOL_FMT_SGROUPS *items, int id, int type) |
Appends a new Sgroup to the array. | |
void | MolFmtSgroups_Free (MOL_FMT_SGROUPS *items) |
Frees the memory allocated for the MOL_FMT_SGROUPS list. | |
int | MolFmtSgroups_GetIndexBySgroupId (int id, MOL_FMT_SGROUPS *items) |
Gets the index of a Sgroup by its ID. | |
MOL_FMT_DATA * | ReadMolfile (INCHI_IOSTREAM *inp_file, MOL_FMT_HEADER_BLOCK *OnlyHeaderBlock, MOL_FMT_CTAB *OnlyCTab, int bGetOrigCoord, int treat_polymers, int pseudos_allowed, char *pname, int lname, unsigned long *Id, const char *pSdfLabel, char *pSdfValue, int *err, char *pStrErr, int bNoWarnings) |
Read MOL file data in to data structures. | |
int | MolfileStrnread (char *dest, char *source, int len, char **first_space) |
Read a string from a source buffer into a destination buffer. | |
int | MolfileReadField (void *data, int field_len, int data_type, char **line_ptr) |
Extract the 'data' in the MOL file field at given text position 'line_ptr'. | |
long | MolfileExtractStrucNum (MOL_FMT_HEADER_BLOCK *pHdr) |
Extract the MOL file number from the header name line like "Structure #22". | |
int | MolfileHasNoChemStruc (MOL_FMT_DATA *mfdata) |
int | MolfileSaveCopy (INCHI_IOSTREAM *inp_file, long fPtrStart, long fPtrEnd, FILE *outfile, long num) |
int | MolfileGetXYZDimAndNormFactors (MOL_FMT_DATA *mfdata, int find_norm_factors, double *x0, double *y0, double *z0, double *xmin, double *ymin, double *zmin, double *scaler, int *err, char *pStrErr) |
MOL_FMT_DATA * | FreeMolfileData (MOL_FMT_DATA *mfdata) |
int | MolfileV3000Init (MOL_FMT_CTAB *ctab, char *pStrErr) |
int | MolfileV3000ReadCTABBeginAndCountsLine (MOL_FMT_CTAB *ctab, INCHI_IOSTREAM *inp_file, char *pStrErr) |
int | MolfileV3000ReadAtomsBlock (MOL_FMT_CTAB *ctab, INCHI_IOSTREAM *inp_file, int err, char *pStrErr) |
int | MolfileV3000ReadBondsBlock (MOL_FMT_CTAB *ctab, INCHI_IOSTREAM *inp_file, int err, char *pStrErr) |
int | MolfileV3000ReadTailOfCTAB (MOL_FMT_CTAB *ctab, INCHI_IOSTREAM *inp_file, int err, char *pStrErr) |
int | MolfileV3000ReadHapticBond (MOL_FMT_CTAB *ctab, char **line_ptr, int **num_list, char *pStrErr) |
int | MolfileV3000ReadStereoCollection (MOL_FMT_CTAB *ctab, char **line_ptr, int **num_list, char *pStrErr) |
int | MolfileV3000ReadSGroup (MOL_FMT_CTAB *ctab, INCHI_IOSTREAM *inp_file, int err, char *pStrErr) |
int | MolfileV3000Read3DBlock (MOL_FMT_CTAB *ctab, INCHI_IOSTREAM *inp_file, int err, char *pStrErr) |
int | MolfileV3000ReadCollections (MOL_FMT_CTAB *ctab, INCHI_IOSTREAM *inp_file, int err, char *pStrErr) |
int | DeleteMolfileV3000Info (MOL_FMT_v3000 *v3000) |
char * | inchi_fgetsLf_V3000 (char *line, INCHI_IOSTREAM *inp_stream) |
int | get_V3000_input_line_to_strbuf (INCHI_IOS_STRING *buf, INCHI_IOSTREAM *inp_stream) |
int | MolfileV3000ReadField (void *data, int data_type, char **line_ptr) |
int | MolfileV3000ReadKeyword (char *key, char **line_ptr) |
int | SDFileSkipExtraData (INCHI_IOSTREAM *inp_file, unsigned long *CAS_num, char *comment, int lcomment, char *name, int lname, int prev_err, const char *pSdfLabel, char *pSdfValue, char *pStrErr, int bNoWarnings) |
int | SDFileIdentifyLabel (char *inp_line, const char *pSdfLabel) |
unsigned long | SDFileExtractCASNo (char *line) |
#define INCHI_US_CHAR_DEF |
#define ISOTOPIC_SHIFT_FLAG 10000 /* add to isotopic mass if isotopic_mass = */ |
#define MOL_FMT_ABSENT 0 |
#define MOL_FMT_CHAR_INT_DATA 'C' |
#define MOL_FMT_CPSS MOL_FMT_ABSENT |
#define MOL_FMT_DOUBLE_DATA 'D' |
#define MOL_FMT_FLOAT_DATA 'F' |
#define MOL_FMT_INPLINELEN 204 /* add cr, lf, double zero termination */ |
#define MOL_FMT_INT_DATA 'I' |
#define MOL_FMT_JUMP_TO_RIGHT 'J' |
#define MOL_FMT_LONG_INT_DATA 'L' |
#define MOL_FMT_M_CONN_EU 3 |
#define MOL_FMT_M_CONN_HH 2 |
#define MOL_FMT_M_CONN_HT 1 |
#define MOL_FMT_M_CONN_NON 0 |
#define MOL_FMT_M_SST_ALT 1 |
Alternating
#define MOL_FMT_M_SST_BLK 3 |
Block
#define MOL_FMT_M_SST_NON 0 |
None
#define MOL_FMT_M_SST_RAN 2 |
Random
#define MOL_FMT_M_STY_COP 3 |
Copolymer
#define MOL_FMT_M_STY_CRO 5 |
Crosslink
#define MOL_FMT_M_STY_MER 6 |
Mer type
#define MOL_FMT_M_STY_MOD 4 |
Modification
#define MOL_FMT_M_STY_MON 2 |
Monomer
#define MOL_FMT_M_STY_NON 0 |
None
#define MOL_FMT_M_STY_SRU 1 |
Structure repeating unit
#define MOL_FMT_MAX_VALUE_LEN 32 /* max length of string containing a numerical value */ |
#define MOL_FMT_MAXLINELEN 200 |
#define MOL_FMT_PRESENT 1 |
#define MOL_FMT_QUERY MOL_FMT_ABSENT |
#define MOL_FMT_REACT MOL_FMT_ABSENT |
#define MOL_FMT_SHORT_INT_DATA 'N' |
#define MOL_FMT_STRING_DATA 'S' |
#define MOL_FMT_V3000_INPLINELEN 32004 /* add cr, lf, double zero termination */ |
#define MOL_FMT_V3000_MAXFIELDLEN 4096 |
#define MOL_FMT_V3000_MAXLINELEN 32000 |
#define MOL_FMT_V3000_STEABS 1 |
#define MOL_FMT_V3000_STENON -1 |
#define MOL_FMT_V3000_STERAC 3 |
#define MOL_FMT_V3000_STEREL 2 |
#define SD_FMT_END_OF_DATA "$$$$" |
typedef struct tagINT_ARRAY INT_ARRAY |
INT_ARRAY - Dynamically growing array of int.
item | Pointer to the array of integers. |
allocated | Amount of memory allocated. |
used | Amount of memory used. |
increment | Amount to increment when expanding. |
typedef struct A_MOL_FMT_ATOM MOL_FMT_ATOM |
Data structure for atom representation in the MOL format.
fx | x coordinate: F10.5; Generic |
fy | y coordinate: F10.5; Generic |
fz | z coordinate: F10.5; Generic |
symbol | Element symbol (aaa; up to 6 characters) |
mass_difference | Mass difference (dd; (M_ISO); Generic: -3..+4 otherwise 0 or 127=most abund. isotope ) |
charge | Formal charge (M CHG) |
radical | Radical status (M RAD) |
stereo_parity | Stereochemical parity (M STY) |
H_count_plus_1 | Hydrogen count plus one (hhh; Query; Hn means >= n H; H0 means no H) |
stereo_care | bbb; Query: 0=ignore; 1=must match |
valence | vvv: <vvv: 0=no marking; (1..14)=(1..14); 15=zero valence.Number of bonds includes bonds to impl. H's> |
H0_designator | HHH: CPSS |
reaction_component_type | rrr: CPSS: 1=reactant, 2=product, 3=intermediate |
reaction_component_num | iii: CPSS: 0 to (n-1) |
atom_atom_mapping_num | mmm: Reaction: 1..255 |
cInversionRetentionFlag | nnn: 1=inverted, 2=retained config.; 0=property not applied |
exact_change_flag | eee |
my_n_impH | number of implicit H calculated for adding H to strings in STDATA |
display_tom | Do not hide element's name (applies to C 7-25-98 DCh) |
atom_aliased_flag | Do not remove charge/radical/isotope if it is in the alias. 9-3-99 DCh |
typedef struct A_MOL_FMT_BOND MOL_FMT_BOND |
Data structure for bond representation in the MOL format.
atnum1 | First atom number. |
atnum2 | Second atom number. |
bond_type | Type of bond (single, double, triple, etc.). |
bond_stereo | Stereo information for the bond. |
bond_topology | Topology information for the bond. |
react_center_status | Reaction center status information. |
typedef struct A_MOL_FMT_CTAB MOL_FMT_CTAB |
Connection table data structure.
n_atoms | Number of atoms in the molecule. |
n_bonds | Number of bonds in the molecule. |
n_atom_lists | Number of atom lists. |
chiral_flag | Chiral flag indicating the presence of chiral centers. |
n_stext_entries | Number of stereo text entries. |
n_reaction_components_plus_1 | Number of reaction components. |
n_reactants | Number of reactants. |
n_products | Number of products. |
n_intermediates | Number of intermediates. |
n_property_lines | Number of property lines. |
follow_inchi_1_treating_iso_mass | Flag indicating whether to follow InChI-1 treating isotopic mass. |
version_string | Version string indicating the format version. |
atoms | Pointer to the array of atom block data structure. |
bonds | Pointer to the array of bond block data structure. |
coords | Pointer to the array of coordinate data structure. |
sgroups | Growable array of pointers to Sgroup objects. |
v3000 | Pointer to the V3000 specific data structure. |
typedef struct A_MOL_FMT_DATA MOL_FMT_DATA |
Data structure for a MOL file.
hdr | Header block data structure. |
ctab | Connection table data structure. |
typedef struct A_MOL_FMT_HEADER_BLOCK MOL_FMT_HEADER_BLOCK |
Data structure for MOL file header block (3 lines).
molname | Name of molecule (up to 80 characters) |
line2 | Second line of the header (the whole line2, up to 80 chars) |
user_initls | User initials (2 bytes; char) |
prog_name | Program name (8 bytes; char) |
month | Month (2 bytes; integral) |
day | Day (2 bytes; integral) |
year | Year (2 bytes; integral) |
hour | Hour (2 bytes; integral) |
minute | Minute (2 bytes; integral ) |
dim_code | Dimensional code (2 bytes, dimensional code, char) |
scaling_factor1 | Scaling factor 1 (2 bytes, I2) |
scaling_factor2 | Scaling factor 2 (10 bytes, F10.5 ) |
energy | Energy (10 bytes, F10.5 ) |
internal_regno | Internal registration number (6 bytes, integral) |
comment | Comment (Line #3, up to 80 characters) |
typedef struct A_MOL_FMT_SGROUP MOL_FMT_SGROUP |
Data structure for Sgroup data (substance group data).
id | it is what is called 'Sgroup number' in CTFile |
type | Sgroup type: SUP = superatom, MUL = multiple group, SRU = SRU type, MON = monomer, MER = Mer type, COP = copolymer, CRO = crosslink, MOD = modification, GRA = graft, COM = component, MIX = mixture, FOR = formulation, DAT = data Sgroup, ANY = any polymer, GEN = generic |
subtype | (SST) |
conn | (SCN) Connectivity |
label | what is called 'unique Sgroup identifier' in CTFile (SLB) |
xbr1 | bracket ends coordinates (SDI) |
xbr2 | bracket ends coordinates (SDI) |
smt | Sgroup Subscript (SMT) |
alist | list of atom indices (AL) |
blist | list of bond indices (BL) |
typedef struct A_MOL_FMT_SGROUPS MOL_FMT_SGROUPS |
MOL_FMT_SGROUPS is a dynamically growing array of pointers to MOL_FMT_SGROUP objects.
group | Pointer to the growable array of pointers to MOL_FMT_SGROUPs |
allocated | Number of allocated objects |
used | Number of used objects |
increment | Array expansion increment |
typedef struct A_MOL_FMT_v3000 MOL_FMT_v3000 |
Data structure for V3000 representation in the MOL format.
n_non_star_atoms | Number of non-star atoms. |
n_star_atoms | Number of star atoms. |
atom_index_orig | Original atom indices as supplied. |
atom_index_fin | Final atom indices, with -1 for star atoms. |
n_sgroups | Number of S-groups. |
n_3d_constraints | Number of 3D constraints. |
n_collections | Number of collections. |
n_non_haptic_bonds | Number of non-haptic bonds. |
n_haptic_bonds | Number of haptic bonds. |
haptic_bonds | Pointer to the list of haptic bonds. |
n_steabs | Number of absolute stereo groups. |
steabs | Pointer to the list of absolute stereo groups (e.g. R and S). |
n_sterel | Number of relative stereo groups. |
sterel | Pointer to the list of relative stereo groups (OR - describes the orientation of groups relative to each other, such as in cis- and trans-isomers). |
n_sterac | Number of racemic stereo groups. |
sterac | Pointer to the list of racemic stereo groups (AND - equal 50:50 mixture of two enantiomers of a chiral molecule). |
typedef struct A_NUM_LISTS NUM_LISTS |
NUM_LISTS - Dynamically growing array of numeric lists.
lists | Pointer to the array of integer lists. |
allocated | Amount of memory allocated. |
used | Amount of memory used. |
increment | Amount to increment when expanding. |
typedef signed char S_CHAR |
typedef unsigned char U_CHAR |
int DeleteMolfileV3000Info | ( | MOL_FMT_v3000 * | v3000 | ) |
MOL_FMT_DATA * FreeMolfileData | ( | MOL_FMT_DATA * | mfdata | ) |
int get_V3000_input_line_to_strbuf | ( | INCHI_IOS_STRING * | buf, |
INCHI_IOSTREAM * | inp_stream | ||
) |
char * inchi_fgetsLf_V3000 | ( | char * | line, |
INCHI_IOSTREAM * | inp_stream | ||
) |
int IntArray_Alloc | ( | INT_ARRAY * | items, |
int | nitems | ||
) |
Initializes an INT_ARRAY structure.
items | Pointer to the INT_ARRAY structure to initialize. |
nitems | Initial number of items to allocate. |
int IntArray_Append | ( | INT_ARRAY * | items, |
int | new_item | ||
) |
Appends a new item to the INT_ARRAY structure.
items | Pointer to the INT_ARRAY structure to modify. |
new_item | The new item to append. |
int IntArray_AppendIfAbsent | ( | INT_ARRAY * | items, |
int | new_item | ||
) |
Appends a new item to the INT_ARRAY structure if it is not already present.
items | Pointer to the INT_ARRAY structure to modify. |
new_item | The new item to append. |
void IntArray_DebugPrint | ( | INT_ARRAY * | items | ) |
Prints the contents of the INT_ARRAY structure for debugging purposes.
items | Pointer to the INT_ARRAY structure to print. |
void IntArray_Free | ( | INT_ARRAY * | items | ) |
Frees the memory allocated for the INT_ARRAY structure.
items | Pointer to the INT_ARRAY structure to free. |
int IntArray_ReAlloc | ( | INT_ARRAY * | items | ) |
Reallocates memory for the INT_ARRAY structure.
items | Pointer to the INT_ARRAY structure to reallocate. |
void IntArray_Reset | ( | INT_ARRAY * | items | ) |
Resets the INT_ARRAY structure to its initial state.
items | Pointer to the INT_ARRAY structure to reset. |
long MolfileExtractStrucNum | ( | MOL_FMT_HEADER_BLOCK * | pHdr | ) |
Extract the MOL file number from the header name line like "Structure #22".
pHdr | Pointer to the header block. |
int MolfileGetXYZDimAndNormFactors | ( | MOL_FMT_DATA * | mfdata, |
int | find_norm_factors, | ||
double * | x0, | ||
double * | y0, | ||
double * | z0, | ||
double * | xmin, | ||
double * | ymin, | ||
double * | zmin, | ||
double * | scaler, | ||
int * | err, | ||
char * | pStrErr | ||
) |
int MolfileHasNoChemStruc | ( | MOL_FMT_DATA * | mfdata | ) |
int MolfileReadField | ( | void * | data, |
int | field_len, | ||
int | data_type, | ||
char ** | line_ptr | ||
) |
Extract the 'data' in the MOL file field at given text position 'line_ptr'.
data | Pointer to the destination buffer. |
field_len | Length of the field to read. For MOL_FMT_STRING_DATA does not include trailing zero, that is actual length of the string pointed by 'data' should be at least field_len+1 bytes. For numerical data 'field_len' is length of input data field For numerical integral data field_len <= 0 means read up to first non-numeric character as strtod() does ("free format") |
data_type | Type of the data to read. E.g. MOL_FMT_STRING_DATA, MOL_FMT_CHAR_INT_DATA, etc. |
line_ptr | Pointer to a variable that will receive the address of the next line. |
on exit *line_ptr points to the next byte after the last entered
int MolfileSaveCopy | ( | INCHI_IOSTREAM * | inp_file, |
long | fPtrStart, | ||
long | fPtrEnd, | ||
FILE * | outfile, | ||
long | num | ||
) |
int MolfileStrnread | ( | char * | dest, |
char * | source, | ||
int | len, | ||
char ** | first_space | ||
) |
Read a string from a source buffer into a destination buffer.
dest | Pointer to the destination buffer. |
source | Pointer to the source buffer. |
len | Length of the string to read. |
first_space | Pointer to a variable that will receive the address of the first space character in the source buffer. |
int MolfileV3000Init | ( | MOL_FMT_CTAB * | ctab, |
char * | pStrErr | ||
) |
int MolfileV3000Read3DBlock | ( | MOL_FMT_CTAB * | ctab, |
INCHI_IOSTREAM * | inp_file, | ||
int | err, | ||
char * | pStrErr | ||
) |
int MolfileV3000ReadAtomsBlock | ( | MOL_FMT_CTAB * | ctab, |
INCHI_IOSTREAM * | inp_file, | ||
int | err, | ||
char * | pStrErr | ||
) |
int MolfileV3000ReadBondsBlock | ( | MOL_FMT_CTAB * | ctab, |
INCHI_IOSTREAM * | inp_file, | ||
int | err, | ||
char * | pStrErr | ||
) |
int MolfileV3000ReadCollections | ( | MOL_FMT_CTAB * | ctab, |
INCHI_IOSTREAM * | inp_file, | ||
int | err, | ||
char * | pStrErr | ||
) |
int MolfileV3000ReadCTABBeginAndCountsLine | ( | MOL_FMT_CTAB * | ctab, |
INCHI_IOSTREAM * | inp_file, | ||
char * | pStrErr | ||
) |
int MolfileV3000ReadField | ( | void * | data, |
int | data_type, | ||
char ** | line_ptr | ||
) |
int MolfileV3000ReadHapticBond | ( | MOL_FMT_CTAB * | ctab, |
char ** | line_ptr, | ||
int ** | num_list, | ||
char * | pStrErr | ||
) |
int MolfileV3000ReadKeyword | ( | char * | key, |
char ** | line_ptr | ||
) |
int MolfileV3000ReadSGroup | ( | MOL_FMT_CTAB * | ctab, |
INCHI_IOSTREAM * | inp_file, | ||
int | err, | ||
char * | pStrErr | ||
) |
int MolfileV3000ReadStereoCollection | ( | MOL_FMT_CTAB * | ctab, |
char ** | line_ptr, | ||
int ** | num_list, | ||
char * | pStrErr | ||
) |
int MolfileV3000ReadTailOfCTAB | ( | MOL_FMT_CTAB * | ctab, |
INCHI_IOSTREAM * | inp_file, | ||
int | err, | ||
char * | pStrErr | ||
) |
int MolFmtSgroup_Create | ( | MOL_FMT_SGROUP ** | sgroup, |
int | id, | ||
int | type | ||
) |
Allocate new array Sgroup.
sgroup | Pointer to the Sgroup structure to allocate. |
id | Sgroup ID. |
type | Sgroup type. |
void MolFmtSgroup_Free | ( | MOL_FMT_SGROUP * | sgroup | ) |
Frees the memory allocated for the Sgroup.
sgroup | Pointer to the Sgroup structure to free. |
int MolFmtSgroups_Alloc | ( | MOL_FMT_SGROUPS * | items, |
int | nitems | ||
) |
Allocates memory for a specified number of Sgroup objects.
items | Pointer to the MOL_FMT_SGROUPS structure. |
nitems | Number of Sgroup objects to allocate. |
int MolFmtSgroups_Append | ( | MOL_FMT_SGROUPS * | items, |
int | id, | ||
int | type | ||
) |
Appends a new Sgroup to the array.
items | Pointer to the MOL_FMT_SGROUPS structure. |
id | Sgroup ID. |
type | Sgroup type. |
void MolFmtSgroups_Free | ( | MOL_FMT_SGROUPS * | items | ) |
Frees the memory allocated for the MOL_FMT_SGROUPS list.
items | Pointer to the MOL_FMT_SGROUPS structure. |
int MolFmtSgroups_GetIndexBySgroupId | ( | int | id, |
MOL_FMT_SGROUPS * | items | ||
) |
Gets the index of a Sgroup by its ID.
id | Sgroup ID. |
items | Pointer to the MOL_FMT_SGROUPS structure. |
int MolFmtSgroups_ReAlloc | ( | MOL_FMT_SGROUPS * | items | ) |
Expand array of Sgroups.
items | Pointer to the MOL_FMT_SGROUPS structure. |
int NumLists_Alloc | ( | NUM_LISTS * | num_lists, |
int | nlists | ||
) |
Allocates memory for a specified number of numeric lists.
num_lists | Pointer to the NUM_LISTS structure. |
nlists | Number of lists to allocate. |
int NumLists_Append | ( | NUM_LISTS * | num_lists, |
int * | list | ||
) |
Push new item to the end of array.
num_lists | Pointer to the NUM_LISTS structure. |
list | Pointer to the list of integers to append. |
void NumLists_Free | ( | NUM_LISTS * | num_lists | ) |
Frees the memory allocated for the numeric list.
num_lists | Pointer to the NUM_LISTS structure. |
int NumLists_ReAlloc | ( | NUM_LISTS * | num_lists | ) |
Reallocates memory for the numeric lists.
num_lists | Pointer to the NUM_LISTS structure. |
MOL_FMT_DATA * ReadMolfile | ( | INCHI_IOSTREAM * | inp_file, |
MOL_FMT_HEADER_BLOCK * | OnlyHeaderBlock, | ||
MOL_FMT_CTAB * | OnlyCTab, | ||
int | bGetOrigCoord, | ||
int | treat_polymers, | ||
int | pseudos_allowed, | ||
char * | pname, | ||
int | lname, | ||
unsigned long * | Id, | ||
const char * | pSdfLabel, | ||
char * | pSdfValue, | ||
int * | err, | ||
char * | pStrErr, | ||
int | bNoWarnings | ||
) |
Read MOL file data in to data structures.
inp_file | Pointer to the input file stream. |
OnlyHeaderBlock | Pointer to the header block to read. |
OnlyCTab | Pointer to the connection table to read. |
bGetOrigCoord | Flag indicating whether to get original coordinates. |
treat_polymers | Flag indicating whether to treat polymers. |
pseudos_allowed | Flag indicating whether pseudo atoms are allowed. |
pname | Pointer to the name buffer. |
lname | Length of the name buffer. |
Id | Pointer to the ID buffer. |
pSdfLabel | Pointer to the SDF label buffer. |
pSdfValue | Pointer to the SDF value buffer. |
err | Pointer to the error code. |
pStrErr | Pointer to the error string buffer. |
bNoWarnings | Flag indicating whether to suppress warnings. |
unsigned long SDFileExtractCASNo | ( | char * | line | ) |
int SDFileIdentifyLabel | ( | char * | inp_line, |
const char * | pSdfLabel | ||
) |
int SDFileSkipExtraData | ( | INCHI_IOSTREAM * | inp_file, |
unsigned long * | CAS_num, | ||
char * | comment, | ||
int | lcomment, | ||
char * | name, | ||
int | lname, | ||
int | prev_err, | ||
const char * | pSdfLabel, | ||
char * | pSdfValue, | ||
char * | pStrErr, | ||
int | bNoWarnings | ||
) |