Skip to content

Commit

Permalink
fix: conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoSilvestr committed Mar 14, 2023
1 parent c1fc4aa commit fa1b105
Showing 1 changed file with 189 additions and 0 deletions.
189 changes: 189 additions & 0 deletions docker/src/__tests__/getMoleculeInfo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,192 @@ test('calculateMoleculeInfo CCC', () => {
}
`);
});
import { Molecule } from 'openchemlib';

import calculateMoleculeInfo from '../calculate/calculateMoleculeInfo';

test('calculateMoleculeInfo', () => {
const molecule = Molecule.fromSmiles('CCC(=O)C[13CH3].[Cl-]');
const info = calculateMoleculeInfo(molecule);
expect(info).toMatchInlineSnapshot(`
{
"acceptorCount": 1,
"charge": -1,
"donorCount": 0,
"em": 122.04537245894,
"idCode": "gOQIHH\`\\\`lkU@LRv@",
"logP": 1.2873999774456024,
"logS": -1.4459999836981297,
"mf": "C4[13C]H10O.Cl(-1)",
"mw": 122.57804846949503,
"nbFragments": 2,
"noStereoID": "gOQILxa|dmeM@FHKC|p",
"noStereoTautomerID": "gOQIHH\`\\\`lmU@\\RvE\\LSBq~drUL_CGpp",
"polarSurfaceArea": 17.06999969482422,
"rotatableBondCount": 2,
"ssIndex": {
"data": [
16,
34,
132,
115,
128,
0,
0,
40,
32,
0,
0,
10,
0,
0,
0,
16,
0,
64,
0,
0,
128,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
32,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"type": "Buffer",
},
"stereoCenterCount": 0,
}
`);
});

test('calculateMoleculeInfo CCC', () => {
const molecule = Molecule.fromSmiles('CCC');
const info = calculateMoleculeInfo(molecule);
expect(info).toMatchInlineSnapshot(`
{
"acceptorCount": 0,
"charge": 0,
"donorCount": 0,
"em": 44.06260025784,
"idCode": "eM@Hz@",
"logP": 1.4315999746322632,
"logS": -1.2539999783039093,
"mf": "C3H8",
"mw": 44.095733722651964,
"nbFragments": 1,
"noStereoID": "eM@Hz@L@",
"noStereoTautomerID": "eM@Hz@",
"polarSurfaceArea": 0,
"rotatableBondCount": 0,
"ssIndex": {
"data": [
0,
0,
128,
64,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
"type": "Buffer",
},
"stereoCenterCount": 0,
}
`);
});

0 comments on commit fa1b105

Please sign in to comment.