If an Ashkenazi Sofer writes a Sefer Torah in the Sephardi or Yemenite tradition:
a) has he fulfilled his obligation of writing a Sefer Torah (thanks, Double AA!), and
b) since a Sefer Torah must be written LiShmah, is it valid for a Sephardi or Yemenite to use?