20package denoptim.integration.tinker;
 
   22import java.util.ArrayList;
 
   43    lstAtoms = 
new ArrayList<TinkerAtom>();
 
   44    zdel = 
new ArrayList<int[]>();
 
   45    zadd = 
new ArrayList<int[]>();
 
   72        ArrayList<Integer> lst = 
new ArrayList<>();
 
   77            lst.add(Integer.valueOf(d[0])); 
 
   80        for (
int i = 0; i<numberOfAtoms; i++)
 
  107        int numberOfAtoms = coords.size();
 
  108        for (
int i = 0; i<numberOfAtoms; i++)
 
  111            double[] x = coords.get(i);
 
  149        return lstAtoms.get(
lstAtoms.size()-1).getXYZIndex();
 
  183        for (
int i=0; i<
lstAtoms.size(); i++)
 
  200    public Object 
clone() throws CloneNotSupportedException
 
  202        return super.clone();
 
  212    String nMolName = this.
molName;
 
  213    ArrayList<TinkerAtom> atms = 
new ArrayList<TinkerAtom>();
 
  214    for (
int ia=0; ia<this.lstAtoms.size(); ia++)
 
  219        double[] oXyz = oTa.
getXYZ();
 
  220        double[] nXyz = 
new double[] {oXyz[0], oXyz[1], oXyz[2]};
 
  222        int[] nNBnd = 
new int[] {oNBnd[0], oNBnd[1], oNBnd[2], oNBnd[3]};
 
  224            double[] nDiAng = 
new double[] {oDiAng[0], oDiAng[1], oDiAng[2]};
 
  231    ArrayList<int[]> 
zadd = 
new ArrayList<int[]>();
 
  232    for (
int ia=0; ia<this.zadd.size(); ia++)
 
  234        int[] oBnd = this.zadd.get(ia);
 
  235        int[] nBnd = 
new int [] {oBnd[0], oBnd[1]};
 
  239    ArrayList<int[]> 
zdel = 
new ArrayList<int[]>();
 
  240        for (
int ia=0; ia<this.zdel.size(); ia++)
 
  242            int[] oBnd = this.zdel.get(ia);
 
  243            int[] nBnd = 
new int [] {oBnd[0], oBnd[1]};
 
  301    int[] newBnd = 
new int[2];
 
  320            int[] nbs = atm.getAtomNeighbours();
 
  322            if ((nbs[0] == t1) && (nbs[1] == t2) && atm.usesProperTorsion())
 
  325                    System.err.println(
"Already used atoms(a): " + t1 + 
" " + t2);
 
  328            else if ((nbs[0] == t2) && (nbs[1] == t1)
 
  329                                                    && atm.usesProperTorsion())
 
  332                    System.err.println(
"Already used atoms(b): " + t2 + 
" " + t1);
 
  346        line = String.format(
"%6d  %s%n", numatoms, 
molName);
 
  347        System.err.print(line);
 
  349        for (
int i = 0; i<numatoms; i++)
 
  357                line = String.format(
"%6d  %-3s%6d%n",
 
  360                System.err.print(line);
 
  364                line = String.format(
"%6d  %-3s%6d%6d%10.5f%n",
 
  367                System.err.print(line);
 
  371                line = String.format(
"%6d  %-3s%6d%6d%10.5f%6d%10.4f%n",
 
  375                System.err.print(line);
 
  380                line = String.format(
"%6d  %-3s%6d%6d%10.5f%6d%10.4f%6d%10.4f%6d%n",
 
  383                                    d1[1], d2[1], d1[2], d2[2], d1[3]);
 
  384                System.err.print(line);
 
  414        System.err.println();
 
Based on the code from ffx.kenai.com Michael J.
 
int getXYZIndex()
Gets the XYZ Index.
 
void moveTo(double[] d)
Add a vector to the Atom's current position vector.
 
void setVertexId(long vidx)
 
int[] getAtomNeighbours()
 
void set3DCoordinates(ArrayList< double[]> coords)
store 3d coordinates of the fragments
 
ArrayList< TinkerAtom > lstAtoms
 
ArrayList< Integer > getConnectedAtoms(int pos)
Identify the list of connected atoms (only first neighbours are considered) to the atom at the specif...
 
TinkerMolecule deepCopy()
This method produces a deep copy of the object.
 
void addBond(int a1, int a2)
Add one bond by appending a pair of indeces into the z-add section.
 
ArrayList< TinkerAtom > getAtoms()
 
TinkerAtom getAtom(int pos)
Returns the atom which has the XYZ index set to pos.
 
boolean isConnected(int atm1, int atm2)
 
void addAtom(TinkerAtom ta)
Add one atom to this molecule.
 
void addMolecule(TinkerMolecule tmol2)
 
void setAtoms(ArrayList< TinkerAtom > lstAtoms)
 
void setBondPairs(ArrayList< int[]> zdel, ArrayList< int[]> zadd)
 
boolean isTorsionUsed(int t1, int t2)
Check if the pair of atoms has been used to define a proper torsion.
 
void setName(String molName)
 
ArrayList< int[]> getBondDel()
 
Object clone()
This method produces a shallow copy of the object.
 
ArrayList< int[]> getBondAdd()
 
TinkerMolecule(String molName, ArrayList< int[]> zadd, ArrayList< int[]> zdel, ArrayList< TinkerAtom > lstAtoms)