wolffd@0: function pot = cg_can_to_mom(pot) wolffd@0: % CG_CAN_TO_MOM Convert a CG potential from canonical to moment form, if necessary. wolffd@0: % pot = cg_can_to_mom(pot) wolffd@0: wolffd@0: if pot.subtype ~= 'm' wolffd@0: for i=1:pot.dsize wolffd@0: pot.mom{i} = cpot_to_mpot(pot.can{i}); wolffd@0: end wolffd@0: pot.subtype = 'm'; wolffd@0: end