$darkmode
DENOPTIM
TinkerBond.java
Go to the documentation of this file.
1
/*
2
* DENOPTIM
3
* Copyright (C) 2019 Vishwesh Venkatraman <vishwesh.venkatraman@ntnu.no>
4
*
5
* This program is free software: you can redistribute it and/or modify
6
* it under the terms of the GNU Affero General Public License as published
7
* by the Free Software Foundation, either version 3 of the License, or
8
* (at your option) any later version.
9
*
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 Affero General Public License for more details.
14
*
15
* You should have received a copy of the GNU Affero General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
*/
18
19
package
denoptim.integration.tinker;
20
25
public
class
TinkerBond
implements
Cloneable
26
{
27
private
TinkerAtom
atoms
[];
28
29
//------------------------------------------------------------------------------
30
37
public
TinkerBond
(
TinkerAtom
a1,
TinkerAtom
a2)
38
{
39
atoms
=
new
TinkerAtom
[2];
40
int
i1 = a1.
getXYZIndex
();
41
int
i2 = a2.
getXYZIndex
();
42
if
(i1 < i2)
43
{
44
atoms
[0] = a1;
45
atoms
[1] = a2;
46
}
47
else
48
{
49
atoms
[0] = a2;
50
atoms
[1] = a1;
51
}
52
}
53
54
//------------------------------------------------------------------------------
55
62
public
TinkerAtom
getAtom
(
int
index)
63
{
64
if
(index >= 0 && index <
atoms
.length)
65
{
66
return
atoms
[index];
67
}
68
return
null
;
69
}
70
71
//------------------------------------------------------------------------------
72
73
}
denoptim.integration.tinker.TinkerAtom
Based on the code from ffx.kenai.com Michael J.
Definition:
TinkerAtom.java:26
denoptim.integration.tinker.TinkerAtom.getXYZIndex
int getXYZIndex()
Gets the XYZ Index.
Definition:
TinkerAtom.java:195
denoptim.integration.tinker.TinkerBond
Definition:
TinkerBond.java:26
denoptim.integration.tinker.TinkerBond.TinkerBond
TinkerBond(TinkerAtom a1, TinkerAtom a2)
Bond constructor.
Definition:
TinkerBond.java:37
denoptim.integration.tinker.TinkerBond.atoms
TinkerAtom atoms[]
Definition:
TinkerBond.java:27
denoptim.integration.tinker.TinkerBond.getAtom
TinkerAtom getAtom(int index)
Get the constituent TinkerAtom specified by index.
Definition:
TinkerBond.java:62
src
main
java
denoptim
integration
tinker
TinkerBond.java
Generated by
1.9.4