Class PotentialsUtils
- All Implemented Interfaces:
PotentialsFunctions
- Direct Known Subclasses:
AlgorithmUtils
- Since:
- 1.0
- Author:
- Jacob M. Litman, Michael J. Schnieders
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(MolecularAssembly assembly) Performs any necessary shutdown operations on a MolecularAssembly, primarily shutting down Parallel Java threads and closing any other open resources.voidcloseAll(MolecularAssembly[] assemblies) Performs any necessary shutdown operations on an array of MolecularAssembly, primarily shutting down Parallel Java threads and closing any other open resources.energy(MolecularAssembly molecularAssembly) Evaluates the energy of a MolecularAssembly and returns its ForceFieldEnergy object.energy(MolecularAssembly[] molecularAssemblies) Evaluates the energy of each MolecularAssembly and returns their ForceFieldEnergy instances.Returns the last SystemFilter created by this (can be null).booleanisLocal()True if using a local implementation (not in a user interfaces module).Return one MolecularAssembly.open.Opens an array of files and returns all created MolecularAssembly objects, setting any underlying Potential to use a certain number of threads.Opens a file and returns all created MolecularAssembly objects.Opens an array of files and returns the created MolecularAssembly objects.Opens a file and returns all created MolecularAssembly objects, setting any underlying Potential to use a certain number of threads.openQuietly(String filename) Open one filename string without printing all the header material.openWithMutations(File file, List<PDBFilter.Mutation> mutations) Mutates file on-the-fly as it is being opened.doublereturnEnergy(MolecularAssembly assembly) Returns the energy of a MolecularAssembly in kcal/mol (as a double) and prints the energy evaluationvoidsave(MolecularAssembly assembly, File file) Saves the current state of a MolecularAssembly to an XYZ file.voidsaveAsPDB(MolecularAssembly[] assemblies, File file) Saves the current state of an array of MolecularAssembly instances to a PDB file.voidsaveAsPDB(MolecularAssembly assembly, File file) Saves the current state of a MolecularAssembly to a PDB file.voidsaveAsPDB(MolecularAssembly assembly, File file, boolean writeEnd, boolean append) voidsaveAsPDBinP1(MolecularAssembly assembly, File file) Saves the symmetry mates of a MolecularAssembly to PDB files.voidsaveAsPDBinP1(MolecularAssembly assembly, File file, int[] lmn) voidsaveAsXYZ(MolecularAssembly assembly, File file) Saves the current state of a MolecularAssembly to an XYZ file.voidsaveAsXYZasReplicates(MolecularAssembly assembly, File file, int[] lmn) Saves the current state of a MolecularAssembly to an XYZ file as a replicates crystal.voidsaveAsXYZinP1(MolecularAssembly assembly, File file) Saves the current state of a MolecularAssembly to an XYZ file as a P1 crystal.doubletime()Logs time elapsed since last call.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ffx.potential.utils.PotentialsFunctions
getActiveAssembly, getArguments, versionFile, versionFile
-
Constructor Details
-
PotentialsUtils
public PotentialsUtils()Constructor for PotentialsUtils.
-
-
Method Details
-
close
Performs any necessary shutdown operations on a MolecularAssembly, primarily shutting down Parallel Java threads and closing any other open resources.Shuts down parallel teams in the force field of the provided MolecularAssembly. Kaminsky's ParallelTeamThreads' run() methods are infinite loops, and because running threads are always GC roots, it is necessary to send them a signal to shut down to enable garbage collection.
- Specified by:
closein interfacePotentialsFunctions- Parameters:
assembly- Assembly to close.
-
closeAll
Performs any necessary shutdown operations on an array of MolecularAssembly, primarily shutting down Parallel Java threads and closing any other open resources.Shuts down parallel teams in the force fields of the provided MolecularAssemblys.
- Specified by:
closeAllin interfacePotentialsFunctions- Parameters:
assemblies- Assemblies to close.
-
energy
Evaluates the energy of a MolecularAssembly and returns its ForceFieldEnergy object.Evaluates the energy of a MolecularAssembly and returns its ForceFieldEnergy object.
- Specified by:
energyin interfacePotentialsFunctions- Parameters:
molecularAssembly- To evaluate- Returns:
- assembly's ForceFieldEnergy.
-
energy
Evaluates the energy of each MolecularAssembly and returns their ForceFieldEnergy instances.- Specified by:
energyin interfacePotentialsFunctions- Parameters:
molecularAssemblies- An array of molecularAssembly instances.- Returns:
- An array of ForceFieldEnergy instances.
-
getFilter
Returns the last SystemFilter created by this (can be null).- Specified by:
getFilterin interfacePotentialsFunctions- Returns:
- Last SystemFilter
-
isLocal
public boolean isLocal()True if using a local implementation (not in a user interfaces module).Returns true (this is the local implementation).
- Specified by:
isLocalin interfacePotentialsFunctions- Returns:
- If a local implementation
-
open
open.- Specified by:
openin interfacePotentialsFunctions- Parameters:
filename- aStringobject.- Returns:
- a
MolecularAssemblyobject.
-
open
Return one MolecularAssembly.- Parameters:
file- aFileobject.- Returns:
- a
MolecularAssemblyobject.
-
open
Opens an array of files and returns all created MolecularAssembly objects, setting any underlying Potential to use a certain number of threads. Default implementation simply ignores nThreads.Opens an array of files and returns all created MolecularAssembly objects, setting any underlying Potential to use a certain number of threads.
- Specified by:
openin interfacePotentialsFunctions- Parameters:
files- an array ofStringobjects.nThreads- Use non-default num threads- Returns:
- Array of MolecularAssembly.
-
openAll
Opens a file and returns all created MolecularAssembly objects.Opens a file and returns all created MolecularAssembly objects.
- Specified by:
openAllin interfacePotentialsFunctions- Parameters:
file- Filename to open- Returns:
- Array of MolecularAssembly.
-
openAll
Opens an array of files and returns the created MolecularAssembly objects.Opens an array of files and returns the created MolecularAssembly objects.
- Specified by:
openAllin interfacePotentialsFunctions- Parameters:
files- Filenames to open.- Returns:
- Array of MolecularAssembly.
-
openAll
Opens a file and returns all created MolecularAssembly objects, setting any underlying Potential to use a certain number of threads. Default implementation simply ignores nThreads.Opens a file and returns all created MolecularAssembly objects, setting any underlying Potential to use a certain number of threads.
- Specified by:
openAllin interfacePotentialsFunctions- Parameters:
file- Filename to opennThreads- Use non-default num threads- Returns:
- Array of MolecularAssembly.
-
openQuietly
Open one filename string without printing all the header material.- Parameters:
filename- aStringobject.- Returns:
- a
MolecularAssemblyobject.
-
openWithMutations
Mutates file on-the-fly as it is being opened. Used to open files for pHMD in fully-protonated form.- Parameters:
file- aFileobject.mutations- aListobject.- Returns:
- a
MolecularAssemblyobject.
-
returnEnergy
Returns the energy of a MolecularAssembly in kcal/mol (as a double) and prints the energy evaluationReturns the energy of a MolecularAssembly in kcal/mol (as a double) and prints the energy evaluation
- Specified by:
returnEnergyin interfacePotentialsFunctions- Parameters:
assembly- To evaluate energy of- Returns:
- Potential energy (kcal/mol)
-
save
Saves the current state of a MolecularAssembly to an XYZ file.Saves the current state of a MolecularAssembly to an XYZ file.
- Specified by:
savein interfacePotentialsFunctions- Parameters:
assembly- MolecularAssembly to savefile- Destination .xyz
-
saveAsXYZinP1
Saves the current state of a MolecularAssembly to an XYZ file as a P1 crystal.Saves the current state of a MolecularAssembly to an XYZ file as a P1 crystal.
- Specified by:
saveAsXYZinP1in interfacePotentialsFunctions- Parameters:
assembly- MolecularAssembly to savefile- Destination .xyz
-
saveAsXYZasReplicates
Saves the current state of a MolecularAssembly to an XYZ file as a replicates crystal.Saves the current state of a MolecularAssembly to an XYZ file as a replicated crystal.
- Specified by:
saveAsXYZasReplicatesin interfacePotentialsFunctions- Parameters:
assembly- MolecularAssembly to savefile- Destination .xyzlmn- Dimensions for replicates crystal.
-
saveAsPDB
Saves the current state of a MolecularAssembly to a PDB file.Saves the current state of a MolecularAssembly to a PDB file.
- Specified by:
saveAsPDBin interfacePotentialsFunctions- Parameters:
assembly- MolecularAssembly to savefile- Destination .pdb
-
saveAsPDB
Saves the current state of a MolecularAssembly to a PDB file.
- Specified by:
saveAsPDBin interfacePotentialsFunctions
-
saveAsPDB
Saves the current state of an array of MolecularAssembly instances to a PDB file.Saves the current state of an array of MolecularAssemblys to a PDB file.
- Specified by:
saveAsPDBin interfacePotentialsFunctions- Parameters:
assemblies- MolecularAssembly array to savefile- Destination .pdb
-
saveAsXYZ
Saves the current state of a MolecularAssembly to an XYZ file.Saves the current state of a MolecularAssembly to an XYZ file.
- Specified by:
saveAsXYZin interfacePotentialsFunctions- Parameters:
assembly- MolecularAssembly to savefile- Destination .xyz
-
saveAsPDBinP1
Saves the symmetry mates of a MolecularAssembly to PDB files.- Specified by:
saveAsPDBinP1in interfacePotentialsFunctions- Parameters:
assembly- To savefile- Destination file
-
saveAsPDBinP1
-
time
public double time()Logs time elapsed since last call.Logs time since this interface was created and the last time this method was called.
- Specified by:
timein interfacePotentialsFunctions- Returns:
- Time.
-