Skip to content

Commit a3e9cdd

Browse files
committed
Add doxygen comments
1 parent 00b9fe5 commit a3e9cdd

File tree

1 file changed

+89
-62
lines changed

1 file changed

+89
-62
lines changed

INCHI-1-SRC/INCHI_BASE/src/mol_fmt.h

Lines changed: 89 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,17 @@ void NumLists_Free(NUM_LISTS *num_lists);
194194

195195
/**
196196
* @brief INT_ARRAY - Dynamically growing array of int
197-
*
198-
* TODO: Provide a brief description of the purpose of this structure.
199-
*
197+
* @param item Pointer to the array of integers.
198+
* @param allocated Amount of memory allocated.
199+
* @param used Amount of memory used.
200+
* @param increment Amount to increment when expanding.
200201
*/
201202
typedef struct tagINT_ARRAY
202203
{
203-
int *item; /**< Pointer to the array of integers. */
204-
int allocated; /**< Amount of memory allocated. */
205-
int used; /**< Amount of memory used. */
206-
int increment; /**< Amount to increment when expanding. */
204+
int *item;
205+
int allocated;
206+
int used;
207+
int increment;
207208
} INT_ARRAY;
208209

209210
/**
@@ -263,38 +264,31 @@ void IntArray_Free(INT_ARRAY *items);
263264
void IntArray_DebugPrint(INT_ARRAY *items);
264265

265266
/**
266-
* @brief MOL_FMT_SGROUP is a container for Sgroup data (substance group data)
267-
*
268-
* TODO: Provide a brief description of the purpose of this structure.
269-
* substance group!
270-
* Sgroup type: SUP = superatom, MUL = multiple group, SRU = SRU
271-
type, MON = monomer, MER = Mer type, COP = copolymer, CRO =
272-
crosslink, MOD = modification, GRA = graft, COM = component, MIX
273-
= mixture, FOR = formulation, DAT = data Sgroup, ANY = any
274-
polymer, GEN = generic
275-
276-
SRU structure repeating unit -> CFU
277-
278-
SBL bond lists
279-
280-
SDI => Sgroup Display Information
281-
282-
283-
Polymer Sgroup subtypes: ALT = alternating, RAN = random, BLO = block
284-
* This structure holds information about a specific Sgroup, including its ID, type, coordinates, and associated lists.
267+
* @brief
268+
*
269+
* @param id it is what is called 'Sgroup number' in CTFile
270+
* @param 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
271+
* @param subtype (SST)
272+
* @param conn (SCN) Connectivity
273+
* @param label what is called 'unique Sgroup identifier' in CTFile (SLB)
274+
* @param xbr1 bracket ends coordinates (SDI)
275+
* @param xbr2 bracket ends coordinates (SDI)
276+
* @param smt Sgroup Subscript (SMT)
277+
* @param alist list of atom indices (AL)
278+
* @param blist list of bond indices (BL)
285279
*/
286280
typedef struct A_MOL_FMT_SGROUP
287281
{
288-
int id; /**< it is what is called 'Sgroup number' in CTFile */
289-
int type; /**< type (STY) */
290-
int subtype; /**< (SST) */
291-
int conn; /**< (SCN) Connectivity */
292-
int label; /**< what is called 'unique Sgroup identifier' in CTFile (SLB) */
293-
double xbr1[4]; /**< bracket ends coordinates (SDI) */
294-
double xbr2[4]; /**< bracket ends coordinates (SDI) */
295-
char smt[80]; /**< Sgroup Subscript (SMT) */
296-
INT_ARRAY alist; /**< list of atom indices (AL) */
297-
INT_ARRAY blist; /**< list of bond indices (BL) */
282+
int id;
283+
int type;
284+
int subtype;
285+
int conn;
286+
int label;
287+
double xbr1[4];
288+
double xbr2[4];
289+
char smt[80];
290+
INT_ARRAY alist;
291+
INT_ARRAY blist;
298292
} MOL_FMT_SGROUP;
299293

300294
/**
@@ -316,16 +310,17 @@ void MolFmtSgroup_Free(MOL_FMT_SGROUP *sgroup);
316310

317311
/**
318312
* @brief MOL_FMT_SGROUPS is a dynamically growing array of pointers to MOL_FMT_SGROUP objects
319-
*
320-
* TODO: Provide a brief description of the purpose of this structure.
321-
*
313+
* @param group Pointer to the growable array of pointers to MOL_FMT_SGROUPs
314+
* @param allocated Number of allocated objects
315+
* @param used Number of used objects
316+
* @param increment Array expansion increment
322317
*/
323318
typedef struct A_MOL_FMT_SGROUPS
324319
{
325-
MOL_FMT_SGROUP **group; /**< growable array of pointers to MOL_FMT_SGROUPs*/
326-
int allocated; /**< allocated number of objects */
327-
int used; /**< current number of objects */
328-
int increment; /**< array expansion increment */
320+
MOL_FMT_SGROUP **group;
321+
int allocated;
322+
int used;
323+
int increment;
329324
} MOL_FMT_SGROUPS;
330325

331326
/**
@@ -367,32 +362,64 @@ void MolFmtSgroups_Free(MOL_FMT_SGROUPS *items);
367362
int MolFmtSgroups_GetIndexBySgroupId(int id, MOL_FMT_SGROUPS *items);
368363

369364
/**
370-
* @brief TODO brief description
371-
*
372-
* TODO longer description.
365+
* @brief Data structure for MOL file header block (3 lines)
366+
* @param molname Name of molecule (up to 80 characters)
367+
* @param line2 Second line of the header (the whole line2, up to 80 chars)
368+
* @param user_initls User initials (2 bytes; char)
369+
* @param prog_name Program name (8 bytes; char)
370+
* @param month Month (2 bytes; integral)
371+
* @param day Day (2 bytes; integral)
372+
* @param year Year (2 bytes; integral)
373+
* @param hour Hour (2 bytes; integral)
374+
* @param minute Minute (2 bytes; integral )
375+
* @param dim_code Dimensional code (2 bytes, dimensional code, char)
376+
* @param scaling_factor1 Scaling factor 1 (2 bytes, I2)
377+
* @param scaling_factor2 Scaling factor 2 (10 bytes, F10.5 )
378+
* @param energy Energy (10 bytes, F10.5 )
379+
* @param internal_regno Internal registration number (6 bytes, integral)
380+
* @param comment Comment (Line #3, up to 80 characters)
373381
*/
374382
typedef struct A_MOL_FMT_HEADER_BLOCK
375383
{
376-
char molname[MOL_FMT_MAXLINELEN + 1]; /**< up to 80 characters */
377-
char line2[MOL_FMT_MAXLINELEN + 1]; /**< the whole line2- up to 80 chars */
378-
char user_initls[3]; /**< 2 bytes; char */
379-
char prog_name[9]; /**< 8 bytes; char */
380-
char month; /**< 2 bytes; integral */
381-
char day; /**< 2 bytes; integral */
382-
char year; /**< 2 bytes; integral */
383-
char hour; /**< 2 bytes; integral */
384-
char minute; /**< 2 bytes; integral */
385-
char dim_code[3]; /**< 2 bytes: dimensional code; char */
386-
short scaling_factor1; /**< 2 bytes; I2 */
387-
double scaling_factor2; /**< 10 bytes, F10.5 */
388-
double energy; /**< 10 bytes, F10.5 */
389-
long internal_regno; /**< 6 bytes, integral */
390-
char comment[81]; /**< Line #3: comment */
384+
char molname[MOL_FMT_MAXLINELEN + 1];
385+
char line2[MOL_FMT_MAXLINELEN + 1];
386+
char user_initls[3];
387+
char prog_name[9];
388+
char month;
389+
char day;
390+
char year;
391+
char hour;
392+
char minute;
393+
char dim_code[3];
394+
short scaling_factor1;
395+
double scaling_factor2;
396+
double energy;
397+
long internal_regno;
398+
char comment[81];
391399
} MOL_FMT_HEADER_BLOCK;
392400

393401
/**
394402
* @brief Atom representation in the MOL format.
395-
*
403+
* @param fx x coordinate: F10.5; Generic
404+
* @param fy y coordinate: F10.5; Generic
405+
* @param fz z coordinate: F10.5; Generic
406+
* @param symbol Element symbol (aaa; up to 6 characters)
407+
* @param mass_difference Mass difference (dd; (M_ISO); Generic: -3..+4 otherwise 0 or 127=most abund. isotope )
408+
* @param charge Formal charge (M CHG)
409+
* @param radical Radical status (M RAD)
410+
* @param stereo_parity Stereochemical parity (M STY)
411+
* @param H_count_plus_1 Hydrogen count plus one (hhh; Query; Hn means >= n H; H0 means no H)
412+
* @param stereo_care bbb; Query: 0=ignore; 1=must match
413+
* @param valence vvv: <vvv: 0=no marking; (1..14)=(1..14); 15=zero valence.Number of bonds includes bonds to impl. H's>
414+
* @param H0_designator HHH: CPSS
415+
* @param reaction_component_type rrr: CPSS: 1=reactant, 2=product, 3=intermediate
416+
* @param reaction_component_num iii: CPSS: 0 to (n-1)
417+
* @param atom_atom_mapping_num mmm: Reaction: 1..255
418+
* @param cInversionRetentionFlag nnn: 1=inverted, 2=retained config.; 0=property not applied
419+
* @param exact_change_flag eee
420+
* @param my_n_impH number of implicit H calculated for adding H to strings in STDATA
421+
* @param display_tom Do not hide element's name (applies to C 7-25-98 DCh)
422+
* @param atom_aliased_flag Do not remove charge/radical/isotope if it is in the alias. 9-3-99 DCh
396423
*/
397424
typedef struct A_MOL_FMT_ATOM
398425
{

0 commit comments

Comments
 (0)