diff --git a/python/lammps/pylammps.py b/python/lammps/pylammps.py index 1e7d9bf3c4..101604a055 100644 --- a/python/lammps/pylammps.py +++ b/python/lammps/pylammps.py @@ -818,7 +818,7 @@ class PyLammps(object): return self.__getattr__("print")(s) def __dir__(self): - return ['angle_coeff', 'angle_style', 'atom_modify', 'atom_style', 'atom_style', + return sorted(set(['angle_coeff', 'angle_style', 'atom_modify', 'atom_style', 'atom_style', 'bond_coeff', 'bond_style', 'boundary', 'change_box', 'communicate', 'compute', 'create_atoms', 'create_box', 'delete_atoms', 'delete_bonds', 'dielectric', 'dihedral_coeff', 'dihedral_style', 'dimension', 'dump', 'fix', 'fix_modify', @@ -828,7 +828,7 @@ class PyLammps(object): 'pair_style', 'processors', 'read', 'read_data', 'read_restart', 'region', 'replicate', 'reset_timestep', 'restart', 'run', 'run_style', 'thermo', 'thermo_modify', 'thermo_style', 'timestep', 'undump', 'unfix', 'units', - 'variable', 'velocity', 'write_restart'] + 'variable', 'velocity', 'write_restart'] + self.lmp.available_styles("command"))) def __getattr__(self, name): """