TYB
>replicate earth's magnetism / gravity?
not possible
perhaps future tech could place some kind of a shield on Lagrange point 1, between Sun and Mars, so Mars would be shielded, but that´s a future sci-fi concept.
haven´t read these old sci-fi books, but it´s interesting, probably will one day