2 * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
3 * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
30 public String resName;
32 public char insCode = ' ';
33 public String resNumIns = null;
35 Color color = Color.lightGray;
37 public int alignmentMapping = -1;
39 public float occupancy=0;
40 public float tfactor=0;
41 public boolean isSelected = false;
43 public Atom(String str)
45 atomIndex = Integer.parseInt(str.substring(6, 11).trim());
47 name = str.substring(12, 15).trim();
49 resName = str.substring(17, 20);
51 chain = str.substring(21, 22);
53 resNumber = Integer.parseInt(str.substring(22, 26).trim());
54 resNumIns = str.substring(22, 27);
55 insCode = str.substring(26, 27).charAt(0);
56 this.x = (float) (new Float(str.substring(30, 38).trim()).floatValue());
57 this.y = (float) (new Float(str.substring(38, 46).trim()).floatValue());
58 this.z = (float) (new Float(str.substring(47, 55).trim()).floatValue());
59 occupancy = (float) (new Float(str.substring(54,60).trim()).floatValue());
60 tfactor = (float) (new Float(str.substring(60,66).trim()).floatValue());
63 public Atom(float x, float y, float z)
69 // public void setColor(Color col) {