Is it all right that my wife gets the house, since she will have primary custody of the children?
You and your wife are free to agree to any property settlement you want, so long as your agreement is valid. That is, the agreement and all its contents were considered, negotiated, and agreed upon by both parties (you and your wife).
The primary or physical custodial parent will often be the spouse that does keep the marital house. By keeping the house, the children will be in a more stable environment during and after the divorce. The house will typically be offset by other property or some other type of reimbursement will be made.
The following is a sample clause that would appear in the settlement agreement for the transfer of the marital house.
The Husband shall sign and deliver to the Wife all documents necessary to transfer title to the Wife in the real estate known as:
1234 Washington Street, Boston, Massachusetts, 18432
This title shall be free of liens and encumbrances, except for the existing mortgage, which Wife assumes. Wife agrees to indemnify and hold harmless the Husband for any mortgage payments, taxes, liability and expense incurred in connection with this property. Husband waives any and all rights or claims to any insurance policies held in connection with said real estate, or the proceeds from any such insurance policies. In consideration of the transfer of the real estate, Wife agrees to pay Husband $XXX,XXX on September 10, 2001.