add density python script for bilayers