~ubuntu-branches/ubuntu/trusty/cdk/trusty-proposed

« back to all changes in this revision

Viewing changes to src/org/openscience/cdk/libio/md/ChargeGroup.java

  • Committer: Bazaar Package Importer
  • Author(s): Paul Cager
  • Date: 2008-04-09 21:17:53 UTC
  • Revision ID: james.westby@ubuntu.com-20080409211753-46lmjw5z8mx5pd8d
Tags: upstream-1.0.2
ImportĀ upstreamĀ versionĀ 1.0.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Revision: 7636 $ $Author: ospjuth $ $Date: 2007-01-04 17:46:10 +0000 (Thu, 04 Jan 2007) $
 
2
 *
 
3
 * Copyright (C) 2007  Ola Spjuth <ospjuth@users.sf.net>
 
4
 * 
 
5
 * Contact: cdk-devel@lists.sourceforge.net
 
6
 * 
 
7
 * This program is free software; you can redistribute it and/or
 
8
 * modify it under the terms of the GNU Lesser General Public License
 
9
 * as published by the Free Software Foundation; either version 2.1
 
10
 * of the License, or (at your option) any later version.
 
11
 * All we ask is that proper credit is given for our work, which includes
 
12
 * - but is not limited to - adding the above copyright notice to the beginning
 
13
 * of your source code files, and to any copyright notice that you may distribute
 
14
 * with programs based on this work.
 
15
 * 
 
16
 * This program is distributed in the hope that it will be useful,
 
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
19
 * GNU Lesser General Public License for more details.
 
20
 * 
 
21
 * You should have received a copy of the GNU Lesser General Public License
 
22
 * along with this program; if not, write to the Free Software
 
23
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 
24
 */
 
25
package org.openscience.cdk.libio.md;
 
26
 
 
27
import org.openscience.cdk.AtomContainer;
 
28
import org.openscience.cdk.interfaces.IAtom;
 
29
import org.openscience.cdk.interfaces.IAtomContainer;
 
30
 
 
31
/**
 
32
 * A ChargeGroup (CG) is a numbered collection of atoms in an MDMolecule.
 
33
 * 
 
34
 * A CG is a small set of atoms with total zero or Integer charge.
 
35
 * 
 
36
 * @author ola
 
37
 * @cdk.module libiomd
 
38
 */
 
39
public class ChargeGroup extends AtomContainer{
 
40
 
 
41
        private static final long serialVersionUID = 362147331841737028L;
 
42
 
 
43
        private int number;
 
44
        private MDMolecule parentMolecule;
 
45
        private IAtom switchingAtom;
 
46
        
 
47
        
 
48
        /**
 
49
         * Empty constructor
 
50
         */
 
51
        public ChargeGroup(){
 
52
        }
 
53
        
 
54
        /**
 
55
         * Constructor to create a ChargeGroup based on an AC, a number, and a MDMolecule
 
56
         * @param container
 
57
         * @param number
 
58
         * @param molecule
 
59
         */
 
60
        public ChargeGroup(IAtomContainer container, int number, MDMolecule parentMolecule) {
 
61
                super(container);
 
62
                this.number=number;
 
63
                this.parentMolecule=parentMolecule;
 
64
        }
 
65
        
 
66
 
 
67
        public int getNumber() {
 
68
                return number;
 
69
        }
 
70
 
 
71
        public void setNumber(int number) {
 
72
                this.number = number;
 
73
        }
 
74
 
 
75
        public MDMolecule getParentMolecule() {
 
76
                return parentMolecule;
 
77
        }
 
78
 
 
79
        public void setParentMolecule(MDMolecule parentMolecule) {
 
80
                this.parentMolecule = parentMolecule;
 
81
        }
 
82
 
 
83
 
 
84
        public IAtom getSwitchingAtom() {
 
85
                return switchingAtom;
 
86
        }
 
87
 
 
88
 
 
89
        public void setSwitchingAtom(IAtom switchingAtom) {
 
90
                this.switchingAtom = switchingAtom;
 
91
        }
 
92
 
 
93
}