about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/BNT/potentials/@cgpot/cg_can_to_mom.m
blob: 951dc9100ed9a7ccad478f2f6060e718144bcf6b (plain)
1
2
3
4
5
6
7
8
9
10
function pot = cg_can_to_mom(pot)
% CG_CAN_TO_MOM Convert a CG potential from canonical to moment form, if necessary.
% pot = cg_can_to_mom(pot)

if pot.subtype ~= 'm'
  for i=1:pot.dsize
    pot.mom{i} = cpot_to_mpot(pot.can{i});
  end
  pot.subtype = 'm';
end