Menu

#233 Improved handling of empty pot|amo|sbc|nip|dip|pol

Introduce OOP
closed
None
2023-02-02
2020-02-26
No

Introducing dummy classdef's for empty pot|amo|sbc|nip|dip|pol allows easy testing for these classes simply by Matlab's isa command, e.g.,

if ~isa(hamilt.pot{m,n},'pot.empty')

Note , however, that upon transforming from diabatic to adiabatic representation things may change. For example, in a simulation of a free system interacting (through permanent or induced) dipole) with external field(s), the corresponding dressed (adiabatic) potential will be non-zero, even though the class is still pot.empty. Hence, in many cases throughout the WavePacket codes, you will still find Matlab's isempty command instead, e.g.,

if ~isempty (hamilt.pot{m,n}.dvr)

even though originally this ticket was intended to replace those ;-(

Discussion

  • Burkhard Schmidt

    Exceptions for potential energy function ?!?

    Should we delete lines 53/54 from Sources/+pot/generic.m ?!?

    Yes, done!
    Hence, no exceptions for potential energy function

     

    Last edit: Burkhard Schmidt 2020-02-28
  • Burkhard Schmidt

    The matlab.mixin.Copyable class is an abstract handle class that provides a copy method for copying handle objects. The copy method makes a shallow copy of the object. This is used in WavePacket in +tmp/@efield/floquet.m . Hence, both in +pot/generic.m and in +dip.generic.m you'll find the followeing first code line

    classdef generic < matlab.mixin.Copyable

     
  • Burkhard Schmidt

    After having introduced the copying of handle objects within +tmp/@efield/floquet.m, the next step would be to do the same also for @wave/adiabatic.m. Also for @traj/adiabatic.m ?!?

    No, maybe this is not a good idea. Because the type of the potential changes ...

     

    Last edit: Burkhard Schmidt 2023-01-26
  • Burkhard Schmidt

    Closing this ticket because we have a new idea, see ticket #283 from 2023.

     

    Last edit: Burkhard Schmidt 2023-02-02
  • Burkhard Schmidt

    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.