Molecular mechanics in crystalline media: The case of (E)-stilbenes