The invention relates to a method for controlling the mechanical stability and porosity of a multi-layer thin film, comprising the step of providing a multi-layer thin film, said film comprising a plurality of layers of polypeptides, said layers of polypeptides having alternating charges, wherein at least one of said layers of polypeptides comprises one or more free sulfhydryl-containing amino acids.