diff --git a/api/http/indigo_service/jsonapi.py b/api/http/indigo_service/jsonapi.py index 0847195127..356ae658b3 100644 --- a/api/http/indigo_service/jsonapi.py +++ b/api/http/indigo_service/jsonapi.py @@ -188,7 +188,7 @@ class CompoundPair(GenericModel, Generic[OutputFormatT]): def make_compound_response( - value: str, compound_format: CompoundFormat, original_format: str + value: str, compound_format: CompoundFormat ) -> CompoundResponse: if compound_format == CompoundFormat.AUTO: raise RuntimeError( @@ -199,7 +199,7 @@ def make_compound_response( **{ "data": { "type": "compound", - "attributes": {"structure": value, "format": compound_format, "original_format": original_format}, + "attributes": {"structure": value, "format": compound_format}, } } ) diff --git a/api/http/indigo_service/service.py b/api/http/indigo_service/service.py index 251f93e171..d6d478c3ac 100644 --- a/api/http/indigo_service/service.py +++ b/api/http/indigo_service/service.py @@ -73,19 +73,18 @@ def to_string( if string_format == jsonapi.CompoundFormat.AUTO: string_format = jsonapi.CompoundFormat.MOLFILE - original_format = compound.getOriginalFormat() if string_format == jsonapi.CompoundFormat.SMILES: - return compound.smiles(), string_format, original_format + return compound.smiles(), string_format if string_format == jsonapi.CompoundFormat.MOLFILE: - return compound.molfile(), string_format, original_format + return compound.molfile(), string_format if string_format == jsonapi.CompoundFormat.CML: - return compound.cml(), string_format, original_format + return compound.cml(), string_format if string_format == jsonapi.CompoundFormat.SMARTS: - return compound.smarts(), string_format, original_format + return compound.smarts(), string_format if string_format == jsonapi.CompoundFormat.KET: - return compound.json(), string_format, original_format + return compound.json(), string_format if string_format == jsonapi.CompoundFormat.INCHI: - return IndigoInchi(indigo()).getInchi(compound), string_format, original_format + return IndigoInchi(indigo()).getInchi(compound), string_format raise RuntimeError(f"{string_format} is not supported")