Coder Social home page Coder Social logo

molecular_modelling's Introduction

Molecular Modelling (WIP)

Java/Processing 3 application that simulates interaction between atoms in a molecule

Alt Text

This program is divided into seven different classes:

The classes shown below are abstracted and only shows the most important variables and methods

The Nucleus Class:

class Nucleus { 
  int AtomicNumber;
  String symbol, name;
  double AtomicWeight, mass;
  int numberOfProtons, numberOfElectrons;
  double radius;
  double electronegativity, firstIonizationEnergy;
  int[] oxidationStates;
  int[] RGB;
}

This class handles initializing the properties of each atom object

The Electron Class:

class Electron {
  int n, l, m, s;
  
  void returnQuantumNumbers(); 
}

This class handles initializing the properties of each electron ojbect and can return the values

The Atom Class:

class Atom extends Nucleus {
  HashMap<String, List<Electron>> Quantum;
  int charge;
  int numberOfElectrons;
  int energyLevels;
  int x, y, z;
  
  void setUpOrbitals();
  void returnOrbital();
  String[] returnProperties();
  int getValanceElectrons();
}

This class joins the nucleus and electron classes together to make an Atom object. The class also holds the x, y, z positions of the atom for when modelling them in 3-Dimensional space

The Bond Class:

class Bond {
  Atom atom1, atom2;
  int numberOfBonds;
  
  void addBond();
  double getBondPolarity();
}

This class is responsible for creating the bond information between two atoms

The Molecule Class:

class Molecule {
  ArrayList<Atom> atoms;
  String[] atomNames;
  
  void dissectMolecule(String molecule);
  int findAtomicNumber(String AtomicSymbol);
  public String[] getAtoms();
}

This class is responsible for dissecting the user's input molecule and breaking each character into a separate atom object with the method dissectMolecule(String molecule). With each atomic symbol broken down, the atomic number can be found with findAtomicNumber(String AtomicSymbol).

The Startup Class:

class Startup {
  void startupWindow();
}

This class contains all of the methods that displays the menus and grabs user input. Other windows within this class displays information about the molecule entered

The Environment Class:

class Environment extends PApplet {
  void setup();
  void draw();
}

This class uses the library processing and peasy cam to 3-D model

molecular_modelling's People

Contributors

gmaldona avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.