unpacked
|
aspirin.class,
aspirin.java,
aterm.class,
aterm.java,
atom.class,
atom.java,
buckybal.class,
buckybal.java,
carbon.class,
carbon.java,
diamond.class,
diamond.java,
dl_atom.class,
dl_atom.java,
dl_bond.class,
dl_bond.java,
dlentry.class,
dlentry.java,
dlforce.class,
dlforce.java,
group.class,
group.java,
hydrogen.class,
hydrogen.java,
lrterm.class,
lrterm.java,
lterm.class,
lterm.java,
nanocad.class,
nanocad.java,
ncad.html,
nitrogen.class,
nitrogen.java,
oxygen.class,
oxygen.java,
propane.class,
propane.java,
term.class,
term.java,
tterm.class,
tterm.java,
tworings.class,
tworings.java,
view.class,
view.java,
water.class,
water.java,
wrapper.class,
wrapper.java
|
|
|
/**
* oxygen.java
* Copyright (c) 1997 Will Ware, all rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* or its derived works must display the following acknowledgement:
* This product includes software developed by Will Ware.
*
* This software is provided "as is" and any express or implied warranties,
* including, but not limited to, the implied warranties of merchantability
* or fitness for any particular purpose are disclaimed. In no event shall
* Will Ware be liable for any direct, indirect, incidental, special,
* exemplary, or consequential damages (including, but not limited to,
* procurement of substitute goods or services; loss of use, data, or
* profits; or business interruption) however caused and on any theory of
* liability, whether in contract, strict liability, or tort (including
* negligence or otherwise) arising in any way out of the use of this
* software, even if advised of the possibility of such damage.
*/
import atom;
import java.awt.Color;
public class oxygen extends atom
{
public static final String rcsid =
"$Id: oxygen.java,v 1.8 1997/08/13 04:32:19 wware Exp $";
public static String ename = "Oxygen";
public static String symbol = "O";
public static int atomicNumber = 8;
public static double mass = 16.0;
public static Color color = Color.red;
public static double vdwRadius = 1.4;
public static int expectedNumBonds = 2;
public oxygen ()
{
double newx[] = { 0.0, 0.0, 0.0 };
x = newx;
hybridization = SP3;
}
public oxygen (double x0, double x1, double x2)
{
double newx[] = { x0, x1, x2 };
x = newx;
hybridization = SP3;
}
public oxygen (int h, double x0, double x1, double x2)
{
double newx[] = { x0, x1, x2 };
x = newx;
hybridization = h;
}
public void rehybridize (int hybrid)
{
hybridization = hybrid;
}
public void rehybridize ()
{
switch (sigmaBonds ())
{
default:
case 2: hybridization = SP3; break;
case 1: hybridization = SP2; break;
}
}
public double covalentRadius ()
{
switch (hybridization)
{
default:
case SP3: return 0.74;
case SP2: return 0.62;
case SP: return 0.55;
}
}
public String name () { return "Oxygen"; }
public String symbol () { return "O"; }
public int atomicNumber () { return 8; }
public double mass () { return 16.0; }
public Color color () { return Color.red; }
public double vdwEnergy ()
{
if (hybridization == SP3)
return 0.406;
else
return 0.536;
}
public double vdwRadius () { return 1.4; }
public int maxNumBonds () { return 2; }
}
|