Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+1 vote

Hi, I want to know how to code properly for Cadabra. I read the section on programming in "The Cadabra Book" pdf but I need a little more explanation on programming new properties (like "::Coordinate")

I want to generate two new properties

  • "Normal" can be applied to a 1D tensor (vector or covector)
  • "Orthogonal" can be applied to any tensor (that is not a scalar)

Then if I have an expression with contraction of two tensors then I will write a function such that

  1. if the two tensors are normal vectors then their contraction is -1
  2. if one tensor is orthogonal and the other is a normal (co)vector then their contraction is 0
in General questions by (320 points)

Hi Amnon. I find your suggestion is very interesting. If you ask me, I would use the substitute algorithm to apply a series of rules, but I see the simplification that might be introduced by the Orthogonal property.

In my ignorance, I would suggest to see the implementation of properties like Commuting or SelfCommuting, since these apply to any of the objects in a set... However, I have doubts about avoiding the self-orthogonality!

Great suggestion.

I searched the cadabra2 src-folder to find the text files containing the word "Commuting". It appears that every property like "Commuting" or "Coordinate" has its own cnb, cc, hh files in the "/core/properties" folder of the source code. From this I understand that adding a property requires to re-compile and build the cadabra2 core, involving CMake etc...

I supposed I need to make a feature request

Hi Amnon. You are right, if you add new features you have to re-compile the src code.

Did you developed the new property already?

No, I didn't make any code

Please log in or register to answer this question.

...