-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add JSdoc comments for api wrapped functions #36
Add JSdoc comments for api wrapped functions #36
Conversation
src/api.ts
Outdated
* CheckINCHI | ||
* Description: Check if the string represents valid InChI/standard InChI | ||
* Input: takes two argument | ||
* input - source InChI string , | ||
* strict (optional) - if false, just briefly check for proper layout (prefix, version, etc.) | ||
* Output: Returns code -1 , 0 , 1 , 2 , 3 , 4 | ||
* -1: InChI is valid and non-standard | ||
* 0: InChI is valid and standard | ||
* 1: InChI has invalid prefix | ||
* 2: InChI has invalid version number (not equal to 1) | ||
* 3: InChI has invalid layout | ||
* 4: Checking InChI through InChI2InChI either failed or produced a result which does not match the source InChI string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/api.ts
Outdated
* - 4: Checking InChI through InChI2InChI either failed or produced a result which does not match the source InChI string | ||
* @example | ||
* ```ts | ||
* const status = CheckINCHI("InChI=1S/C3H5NO/c1-2-5-3-4-1/h3H,1-2H2/p+1",false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* const status = CheckINCHI("InChI=1S/C3H5NO/c1-2-5-3-4-1/h3H,1-2H2/p+1",false); | |
* const status = CheckINCHI("InChI=1S/C3H5NO/c1-2-5-3-4-1/h3H,1-2H2/p+1", false); |
src/api.ts
Outdated
* ```ts | ||
* const status = CheckINCHI("InChI=1S/C3H5NO/c1-2-5-3-4-1/h3H,1-2H2/p+1",false); | ||
* console.log(status); | ||
* //0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* //0 | |
* // 0 |
src/api.ts
Outdated
* ```ts | ||
* const length = GetStringLength("VNWKTOKETHGBQD-UHFFFAOYSA-N"); | ||
* console.log(length); | ||
* //27 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* //27 | |
* // 27 |
src/api.ts
Outdated
* ```ts | ||
* const output = GetStructFromINCHI("InChI=1S/C2H6O/c1-2-3/h3H,2H2,1H3"); | ||
* console.log(output.status); | ||
* //0 | ||
* console.log(output.data.atom.x); | ||
* //0 | ||
* console.log(output.data.atom.y); | ||
* //0 | ||
* console.log(output.data.atom.z); | ||
* //0 | ||
* ``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle spacing properly. (Same as previous comments)
src/api.ts
Outdated
* @param {object} options (optional) An object containing chosen options as key and their values as true | ||
* @returns output is an object containing status and data | ||
* - status - The returned code | ||
* - data - data contains structure created from input (Inchi) string | ||
* -- atom - Array of atom objects which contains various data like atom co-ordinates (x,y,z) , neighbor, bondType , bondStereo, elName, numBonds, numIsoh, isotopicMass, radical, charge | ||
* -- stereo0D - array of num_stereo0D 0D stereo elements or NULL | ||
* -- numAtoms - number of atoms in the structure | ||
* -- numStereo0D - number of 0D stereo elements | ||
* -- szMessage - A string containing Error/warning ASCIIZ message | ||
* -- szLog - log-file ASCIIZ string, contains a human-readable list of recognized options and possibly an Error/warn message | ||
* -- warningFlags - A 2d Array conataining warnings , [x][y]: | ||
* -- x=0 => Reconnected if present in InChI otherwise Disconnected/Normal | ||
* -- x=1 => Disconnected layer if Reconn. layer is present |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please post a snapshot of how it looks upon hover.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/api.ts
Outdated
* @returns output is an object containing status and data | ||
* - status - The returned code | ||
* - data - data contains structure created from input (Inchi) string | ||
* -- atom - Array of atom objects which contains various data like atom co-ordinates (x,y,z) , neighbor, bondType , bondStereo, elName, numBonds, numIsoh, isotopicMass, radical, charge | ||
* -- stereo0D - array of num_stereo0D 0D stereo elements or NULL | ||
* -- numAtoms - number of atoms in the structure | ||
* -- numStereo0D - number of 0D stereo elements | ||
* -- szMessage - A string containing Error/warning ASCIIZ message | ||
* -- szLog - log-file ASCIIZ string, contains a human-readable list of recognized options and possibly an Error/warn message | ||
* -- warningFlags - A 2d Array conataining warnings , [x][y]: | ||
* -- x=0 => Reconnected if present in InChI otherwise Disconnected/Normal | ||
* -- x=1 => Disconnected layer if Reconn. layer is present |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.