bioclipse.scripting

UnitConversion.py

Source code

The source code may use or refer to content in a local workspace. This Bioclipse workspace used can be found on GitHub.

Bioclipse 2.6

quantity = qudt.newQuantity(1.0, "m")
print(quantity)
converted = qudt.convertTo(quantity, "cm");
print(converted)

Bacting

To run this code, you first need to install Bacting (Groovy) or pyBacting (Python).

from pybacting import qudt

quantity = qudt.newQuantity(1.0, "m")
print(quantity)
converted = qudt.convertTo(quantity, "cm");
print(converted)

Open in Google Colab

Output

1.0 m
100.0 cm