Ab initio study of weakly ferromagnetic antiferromagnets