Index: mttroot/mtt/bin/trans/m/ibg2abg.m ================================================================== --- mttroot/mtt/bin/trans/m/ibg2abg.m +++ mttroot/mtt/bin/trans/m/ibg2abg.m @@ -328,10 +328,16 @@ elseif (head.n_subs > 1) mtt_info(sprintf("Vector port %s matches %s", head_bond.label, tail_bond.label), infofile); endif + ## write type at other end + eval(sprintf("%s.other_end_type = '%s';", + head_str, tail.type)); + eval(sprintf("%s.other_end_type = '%s';", + tail_str, head.type)); + ## assign bond number for i = 1:head.n_subs ++unique_bond_number; eval(sprintf("%s.subbond%i.index = +%i;", head_str, i, unique_bond_number)); @@ -465,15 +471,28 @@ if (struct_contains(comp_s, "comp")) for [comp, comp_name] = comp_s.comp counter = 0; for [bond, bond_name] = comp if (index(bond_name, "bond") == 1) - for [sub_bond, sub_bond_name] = bond - if (index(sub_bond_name, "subbond") == 1) - components(comp.index, ++counter) = sub_bond.index - endif - endfor + if (strcmp(bond.other_end_type, "SS")) + for [sub_bond, sub_bond_name] = bond + if (index(sub_bond_name, "subbond") == 1) + components(comp.index, ++counter) = sub_bond.index + endif + endfor + endif + endif + endfor + for [bond, bond_name] = comp + if (index(bond_name, "bond") == 1) + if (!strcmp(bond.other_end_type, "SS")) + for [sub_bond, sub_bond_name] = bond + if (index(sub_bond_name, "subbond") == 1) + components(comp.index, ++counter) = sub_bond.index + endif + endfor + endif endif endfor endfor endif