refactored rule engine, added periodic boundary support in MoleculeModel, added surface