On Wednesday, 4 February 2015 16:59:14 UTC, Avik Sengupta wrote:

> I don't understand your domain of course, but the way I'd do this would be 
>> a slight variant of OPTION 1
>>
>> get_forces(a::AbstractAtom) = error("All AbstractAtom subtypes should 
>> implement get_forces")
>> get_forces(a::Atom) = get_forces(a.calc)
>>
>>
> this is indeed what I've done at the moment. Good to hear that this is not 
> completely idiotic. 
>
 
Ok, actually this is slightly different - so I don't understand why this 
would help? Is it just the fact that not all implementations of 
AbstractAtoms need to have a field `calc`?

Many thanks,
    Christoph  

Reply via email to