Molecular Mechanism of Polymorphic Transitions