DMD code (Li Group)