SciAPI


A Scientific Computational Application Programming Interface

An open-source API for embedding those tough scientific computations in your application with ease. Scientific formulas and relationships have been developed and implemented, let's not repeat that work every time we want to create a science-based application! This is for researchers, educators and developers.


JavaScript API usage example:


// Requesting a calculation using a function name and parameter footprint.
$.post('https://sciapi.herokuapp.com/request/Force_Between_Charges',
    {
          q_one: -1.60 * 10 ** -19,       // Optional parameter values.
          q_two: 1.60 * 10 ** -19,        // Without parameters, we will give you the code to perform the operation.
          r: 8.5 * 10 ** -6,              // With parameters, we will also insert the parameters into the code.
          _api_key: api-key               // Get an API key by signing up for free!
    })
    .done(function(data){
          var code = data.code;       // The JavaScript code that performs the operation.
                                      // The code will be populated with any parameters provided with the request.
          var widget = data.widget;   // A widget containing the formula in text, JavaScript code,
                                      // an associated Wolfram Alpha widget and a related photograph.
          var message = data.message; // Feedback from the API, including any errors and suggestions.
          var status = data.status;   // The status of the request.
    });
                    


Access the computations of SciAPI through the Android application, SciAPI Mobile. Download the app for free from the Google Play Store.




SciDev is a desktop IDE that comes with the SciAPI library setup and ready to go. The app includes easy access to the visual computation widgets of SciAPI as well as syntax checking, code highlighting, native JavaScript compilation and debugging tools.



The computations are accessible through a dynamic JavaScript library of all the functions in the SciAPI knowledge base. Download the sciapilib.js and include it in your application! Replace var API_KEY = "123456789abcdefghijklmnopqrstuvwxyz"; in the file to activate the dynamic library.


Dynamic library usage example:


var angularVelocity = 5; // Keep track of your own units.
var angularAcceleration = 10;
var momentOfInertia = 15;
var power = sciapi.angularPower(sciapi.netTorque(momentOfInertia, angularAcceleration), angularVelocity);
                    

This is an ongoing project, and anyone can participate! If you'd like to learn about Laravel, PHP, JavaScript, APIs or science check out the GitHub repository. If you would like to participate but aren't interested in coding, and know your stuff in a field of science or mathematics, you can add computations to the API right here on the site.



All Widgets

image

Gravitational Potential Energy


Calculates gravitational potential energy (U) of a body with a mass (m_1) that arises from the force acting between it and another body with mass (m_2), with the distance between the centres of mass (r). G is the gravitational constant 6.674×10−11 N · (m/kg)2.

image

Acceleration


Calculates acceleration (a) from final velocity (v_2), initial velocity (v_1) and the time (delta t).

image

Torque


Calculates torque (T) from the applied force (F), the moment arm (r) and the angle between the force and moment arm (theta).

image

Resistance


Calculates the resistance (R) from the voltage (V) and current (I).

image

Thermal Conductivity


Calculates the thermal conductance (P), which is the amount of heat (delta Q) transferred per time (delta t), from the cross sectional area of the thermal conductor (A), initial temperature difference (delta T), the thickness of the material (d) and the thermal conductivity constant for the material (k).

image

Net Torque


Calculates the net torque about an axis from the moment of inertia (I) and angular acceleration (alpha).

image

Force Between Charges


Calculates the force between two charges from the distance between them (r), the magnitude of the first charge (q1) and the magnitude of the second charge (q2). The constant k = 8.99x10^9 N m^2/c^2.

image

Angular Work


Calculates the work (W) done by rotation about an axis from the initial (Ek_i) and final (Ek_f) kinetic energies.

image

Heat Energy


Calculates the heat energy (Q) of a substance from its mass (m), its specific heat (c) and the change in temperature (dT).

image

Escape Speed


Calculates the escape speed (v) of a body from the gravitational force acting between it and another body with mass (m), with the distance between the centres of mass (r). G is the gravitational constant 6.674×10−11 N · (m/kg)2.

image

Angular Power


Calculates the power from torque (T) and the angular velocity (w).

image

Angular Kinetic Energy


Calculates the kinetic energy from the moment of inertia (I) and angular velocity (w) about an axis or rotation.

image

Pauli Z Gate


The Pauli Z gate acts on a single qubit. It equates to a rotation around the Z-axis of the Bloch sphere by π radians. It is a special case of a phase shift gate with θ=π.

image

Hadamard Gate


One application of the Hadamard gate to either a 0 or 1 qubit will produce a quantum state that, if observed, will be a 0 or 1 with equal probability. However, if the Hadamard gate is applied twice, then the final state is always the same as the initial state.

image

Pauli Y Gate


The Pauli-Y gate acts on a single qubit. It equates to a rotation around the Y-axis of the Bloch sphere by π radians.

image

DS1 Decoder


Decodes a DS-1 frame. DS-1 frames consist of a framing bit, followed by 24 channels of data, where every 6th channel has 7 bits in it and the rest have 8 bits.

image

DS1 Encoder


Encodes a DS-1 frame. DS-1 frames consist of a framing bit, followed by 24 channels of data, where every 6th channel has 7 bits in it and the rest have 8 bits.

image

Pauli X Gate


The X gate is one of the fundamental Pauli gates and acts on a single qubit. It is the quantum equivalent of the NOT gate for classical computers . It equates to a rotation of the Bloch sphere around the X-axis by π radians. The computation returns the value of alpha resulting from the operation.