Catalyzes the synthesis of D-serine from L-serine. Has dehydratase activity towards both L-serine and D-serine. L-serine = D-serine L-serine = NH4(+) + pyruvate D-serine = NH4(+) + pyruvate Allosterically activated by ATP, by magnesium, and possibly also by other divalent metal cations. Homodimer. Modification of the active site Lys by its substrate Ser to lysino-D-alanine reduces but does not abolish enzyme activity. Belongs to the serine/threonine dehydratase family.