<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def dmat(c,nocc):
    "Form the density matrix from the first nocc orbitals of c"
    return np.dot(c[:,:nocc],c[:,:nocc].T)