com.actelion.research.chem.phesa.PheSAMolecule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of openchemlib Show documentation
Show all versions of openchemlib Show documentation
Open Source Chemistry Library
package com.actelion.research.chem.phesa;
import com.actelion.research.chem.StereoMolecule;
import java.util.ArrayList;
import com.actelion.research.chem.Coordinates;
import com.actelion.research.chem.Molecule;
/**
* @version: 1.0, February 2018
* Author: J. Wahl
* contains all information about a molecule (atoms, connectivity) and its shape including flexibilty (Molecular Volumes of a conformational ensemble)
* the Coordinates of the hydrogens are contained and therefore any molecular conformer can be back-calculated on request
* the heavy atom coordinates are implicitly given as the centers of the atomic gaussians
*
*/
public class PheSAMolecule {
private StereoMolecule mol;
// As many objects as conformers.
private ArrayList shape;
public PheSAMolecule() {
this.mol = new StereoMolecule();
this.shape = new ArrayList();
}
public PheSAMolecule(StereoMolecule mol, MolecularVolume shape) {
this.mol = mol;
this.shape = new ArrayList();
this.shape.add(shape);
}
public PheSAMolecule(StereoMolecule mol, ArrayList shape) {
this.mol = mol;
this.shape = shape;
}
/**
* Returns the corresponding conformer of a molecular volume
* @param molVol
* @return
*/
public StereoMolecule getConformer(MolecularVolume molVol) {
int nrOfAtoms = mol.getAllAtoms();
StereoMolecule conformer = new StereoMolecule(mol);
int hydrogenCounter = 0;
ArrayList hydrogens = molVol.getHydrogens();
for(int i=0;i getVolumes() {
return this.shape;
}
}