Skip to content

Commit

Permalink
add preset
Browse files Browse the repository at this point in the history
  • Loading branch information
philopon committed Jun 13, 2016
1 parent 07e98af commit 43746a0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mordred/MoRSE.py
Expand Up @@ -18,9 +18,17 @@ class MoRSE(Descriptor):
@classmethod
def preset(cls):
return chain(
cls(None, i) for i in range(1, 33),
(cls(None, i) for i in range(1, 33)),
(cls('m', i) for i in range(1, 33)),
(cls('v', i) for i in range(1, 33)),
(cls('se', i) for i in range(1, 33)),
(cls('p', i) for i in range(1, 33)),
)

def __str__(self):
p = '' if self._prop is None else self._prop.as_argument
return 'MOR{:02d}{}'.format(self._distance, p)

def as_key(self):
p = None if self._prop is None else self._prop.as_argument
return self.__class__, (p, self._distance)
Expand Down

0 comments on commit 43746a0

Please sign in to comment.