-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict'; | ||
|
||
const { readFileSync } = require('fs'); | ||
const { join } = require('path'); | ||
|
||
const { Molecule } = require('../../dist/openchemlib-full.pretty'); | ||
|
||
const molfile = readFileSync(join(__dirname, 'molfile.txt'), 'utf8'); | ||
const molecule = Molecule.fromMolfile(molfile); | ||
console.log('molecule', molecule.getAllAtoms()); | ||
|
||
const molfileNoSGroup = readFileSync( | ||
join(__dirname, 'molfileNoSGroup.txt'), | ||
'utf8', | ||
); | ||
const moleculeNoSGroup = Molecule.fromMolfile(molfileNoSGroup); | ||
console.log('moleculeNoSGroup', moleculeNoSGroup.getAllAtoms()); | ||
|
||
const molfileV2000 = readFileSync(join(__dirname, 'molfileV2000.txt'), 'utf8'); | ||
const moleculeV2000 = Molecule.fromMolfile(molfileV2000); | ||
console.log('moleculeV2000', moleculeV2000.getAllAtoms()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
first line | ||
ChemDraw10152219412D | ||
third line | ||
0 0 0 0 0 0 V3000 | ||
M V30 BEGIN CTAB | ||
M V30 COUNTS 3 2 1 0 0 | ||
M V30 BEGIN ATOM | ||
M V30 1 C -0.714471 -0.412500 0.000000 0 | ||
M V30 2 C 0.000000 0.000000 0.000000 0 | ||
M V30 3 N 0.714471 0.412500 0.000000 0 | ||
M V30 END ATOM | ||
M V30 BEGIN BOND | ||
M V30 1 3 2 3 | ||
M V30 2 1 1 2 | ||
M V30 END BOND | ||
M V30 BEGIN SGROUP | ||
M V30 1 SUP 1 ATOMS=(2 2 3) XBONDS=(1 2) LABEL=CN CSTATE=(4 2 -0.714471 - | ||
M V30 -0.412500 0) | ||
M V30 END SGROUP | ||
M V30 END CTAB | ||
M END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
first line | ||
ChemDraw10152219412D | ||
third line | ||
0 0 0 0 0 0 V3000 | ||
M V30 BEGIN CTAB | ||
M V30 COUNTS 3 2 0 0 0 | ||
M V30 BEGIN ATOM | ||
M V30 1 C -0.714471 -0.412500 0.000000 0 | ||
M V30 2 C 0.000000 0.000000 0.000000 0 | ||
M V30 3 N 0.714471 0.412500 0.000000 0 | ||
M V30 END ATOM | ||
M V30 BEGIN BOND | ||
M V30 1 3 2 3 | ||
M V30 2 1 1 2 | ||
M V30 END BOND | ||
M V30 END CTAB | ||
M END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
ChemDraw10152219562D | ||
|
||
3 2 0 0 0 0 0 0 0 0999 V2000 | ||
-0.7145 -0.4125 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 | ||
0.7145 0.4125 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 | ||
2 3 3 0 | ||
1 2 1 0 | ||
M STY 1 1 SUP | ||
M SLB 1 1 1 | ||
M SAL 1 2 2 3 | ||
M SBL 1 1 2 | ||
M SMT 1 CN | ||
M SBV 1 2 -0.7145 -0.4125 | ||
M END |