SSMS command to disconnect after query has finished
Easy one ...
Think about why do you want to do it ? Any specific reasons ?
From BOL :
To change the options for the current queries, click Query Options on the Query menu or the shortcut menu of the SQL Server Query window. Under Execution, click Advanced.

Disconnect after the query executes
When this check box is selected, the connection to SQL Server is terminated after the query completes. This check box is cleared by default.