Skip to content
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

#1723 convert Daylight SMILES using indigo api #1726

Merged
merged 1 commit into from
Sep 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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