Skip to content

Commit

Permalink
Py3 Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielelanaro committed Jun 3, 2015
1 parent a9357f3 commit 038dd29
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 112 deletions.
10 changes: 2 additions & 8 deletions chemlab/mviewer/api/appeareance.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
from core import *
from selections import *
from chemlab.graphics import colors
Expand Down Expand Up @@ -139,10 +140,7 @@ def change_hue(amount):
hsl_cols = colors.rgb_to_hsl(rgb_cols)
hsl_cols[:, 0] = np.clip(hsl_cols[:, 0] + amount, 0, 254)

print rgb_cols[0]
print hsl_cols[0]
rgb_cols = colors.hsl_to_rgb(hsl_cols)
print rgb_cols[0]
rep.atom_colors[:, 0:3] = rgb_cols


Expand All @@ -151,12 +149,8 @@ def change_saturation(amount):
rgb_cols = np.array(rep.atom_colors.array)[:, 0:3]
hsl_cols = colors.rgb_to_hsl(rgb_cols)
hsl_cols[:, 1] = np.clip(hsl_cols[:, 1] + amount, 0, 254)

print rgb_cols[0]
print hsl_cols[0]

rgb_cols = colors.hsl_to_rgb(hsl_cols)
print rgb_cols[0]

rep.atom_colors[:, 0:3] = rgb_cols

Expand Down Expand Up @@ -263,4 +257,4 @@ def change_post_processing_options(str_id, **options):
"""
_effect_map[str_id].set_options(**options)
viewer.update()
viewer.update()
4 changes: 2 additions & 2 deletions recipes/chemlab/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package:
name: chemlab
version: 0.4
version: 0.4.1

source:
git_url: https://github.com/chemlab/chemlab.git
git_tag: v0.4
# git_tag: v0.4

requirements:
build:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_forces.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
'''Calculate forces between atoms'''

from __future__ import print_function
from chemlab import Atom, Molecule
from chemlab.core.system import MonatomicSystem
from chemlab.molsim.cforces import lennard_jones
Expand Down Expand Up @@ -137,7 +137,7 @@ def test_energy():

myens.append(myen)
arr[1,0] += 0.001e-9
print force, myforce
print(force, myforce)

import pylab as pl
pl.plot(rs, ens)
Expand Down
100 changes: 0 additions & 100 deletions tests/test_simul.py

This file was deleted.

0 comments on commit 038dd29

Please sign in to comment.