How to use the pyscal.pickle_object.pickle_atom function in pyscal

To help you get started, we’ve selected a few pyscal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github srmnitc / pyscal / src / pyscal / core.py View on Github external
"""

        #get the basic system indicators
        indicators = self.get_indicators()
        #get box dims and triclinic params if triclinic
        box = self.box
        if indicators[6] == 1:
            rot = self.get_triclinic_params()
        else:
            rot = 0

        #now finally get atoms
        atoms = self.atoms
        #convert them to picklabale atoms
        patoms = [pp.pickle_atom(atom) for atom in atoms]

        #create System instance and assign things
        psys = pp.pickleSystem()
        psys.indicators = indicators
        psys.atoms = patoms
        psys.box = box
        psys.rot = rot

        return psys