Skip to content

Commit

Permalink
Ketcher started using API call /convert to convert ket format to Dayl…
Browse files Browse the repository at this point in the history
…ight SMILES because Indigo supports reagents (#1726)
  • Loading branch information
LadaYudovina authored Sep 20, 2022
1 parent bf260ae commit 5269152
Showing 1 changed file with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,14 @@ import {
import {
KetSerializer,
MolSerializer,
MolSerializerOptions,
SmiSerializer
MolSerializerOptions
} from 'domain/serializers'
import { StructService, StructServiceOptions } from 'domain/services'

import { KetFormatter } from './ketFormatter'
import { MolfileV2000Formatter } from './molfileV2000Formatter'
import { RxnFormatter } from './rxnFormatter'
import { ServerFormatter } from './serverFormatter'
import { SmilesFormatter } from './smilesFormatter'

export class FormatterFactory {
#structService: StructService
Expand Down Expand Up @@ -85,24 +83,12 @@ export class FormatterFactory {
formatter = new RxnFormatter(new MolSerializer(molSerializerOptions))
break

case 'smiles':
formatter = new SmilesFormatter(
new SmiSerializer(),

// only for ServerFormatter, because 'getStructureFromStringAsync' is delegated to it

this.#structService,
new KetSerializer(),
format,
structServiceOptions
)
break

case 'cml':
case 'inChIAuxInfo':
case 'inChI':
case 'molV3000':
case 'rxnV3000':
case 'smiles':
case 'smilesExt':
case 'smarts':
case 'cdxml':
Expand Down

0 comments on commit 5269152

Please sign in to comment.