package Atom;

@ISA=qw(chemistry);
use ForceField;

sub new {
	my $class=shift;
	$self = {
		id => "",
		charge => 0.0,
		type => 0,
		xyz => 0,
		};
	bless $self;
}

sub id {
	my ($self, $id) = @_;
	$self->{id} = $id if defined $id;
	return $self->{id};
}

sub charge {
	my ($self, $charge) = @_;
	$self->{charge} = $charge if defined $charge;
	return $self->{charge};
}

sub type {
	my ($self, $type) = @_;
	$self->{type} = $type if defined $name;
	return $self->{type};
}

sub xyz {
	my ($self, $xyz) = @_;
	$self->{xyz} = $xyz if defined $xyz;
	return $self->{xyz};
}

sub res {
	my ($self, $res) = @_;
	$self->{res} = $res if defined $res;
	return $self->{res};
}

sub loadAtomPDB {
	my ($self, $lin, $ff) = @_;
	my ($lab,$numAt, $id, $res, $nres, $x, $y, $z, $ch, $tipAt) = split " ", $lin;
	$self = Atom->new;
	$self->id ($id);
	$self->xyz (Point->new ($x, $y, $z));
	$self->charge = $ch;
	$self->type ($ff->atType($tipAt));
	return $self;
}


"1";



	
