Skip to content

Commit

Permalink
#5512 - System saves mixture ambiguous monomers as alternatives ambig…
Browse files Browse the repository at this point in the history
…uous monomers (#5516)

- fixed template id generation for ambiguous monomers
  • Loading branch information
rrodionov91 authored Sep 16, 2024
1 parent 7d432df commit dd00d41
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -715,10 +715,15 @@ export class KetSerializer implements Serializer<Struct> {

if (monomer instanceof AmbiguousMonomer) {
templateId =
monomer.variantMonomerItem.id ||
monomer.monomers.reduce(
(templateId, monomer) =>
templateId + '_' + getMonomerUniqueKey(monomer.monomerItem),
monomer.variantMonomerItem.subtype +
'_' +
monomer.variantMonomerItem.options.reduce(
(templateId, option) =>
templateId +
'_' +
option.templateId +
'_' +
(option.probability || option.ratio || ''),
'',
);
} else {
Expand Down

0 comments on commit dd00d41

Please sign in to comment.