All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.11.16 - 2024-11-13
utils.rmsd()
andutils.align()
functions for computingrmsd
between structures and aligning structures.
0.11.15 - 2024-11-11
Structure.swap_indices()
method for changing the indices of a structure's symbols and geometry. Helpful for setting up structures for an NEB run or RMSD calculation in which index labels are important.
0.11.14 - 2024-10-16
view.view(...)
displays an empty string if.model
isNone
onDualProgramInput
rather than raising an exception.
0.11.13 - 2024-10-01
interval
to view animations. Sets the interval between frames in milliseconds. Defaults to 100.
0.11.12 - 2024-10-01
- Added
charge
andmultiplicity
to the Structure column of the output table view.
0.11.11 - 2024-09-30
- Attributes on models that are not explicitly set (i.e., values set to their default value) will not be serialized and saved. This behavior can be modified by passing
exclude_unset=True
to.save(...)
. Model
in the table view is now a mini table to better visualize method and basis.
0.11.10 - 2024-09-23
Structure.distance(i, j, units='bohr' | 'angstrom')
returns the distance between atomsi, j
.view.view(... distances=[(0, 1), (4,27), ...])
will display the distances between atoms at these indices.
0.11.9 - 2024-08-16
Structure
views now useGridViewer
when laying out multiple structures withpy3Dmol
so as to use only one WebGL context for all images. This dramatically improves performance and reduces lag.
- View for
ConformerSearchResults
. view_2d
option for viewing a2D
image of a molecule rather than the3D
viewer.
0.11.8 - 2024-08-13
CNAME
file to/docs
directory.data_source
anddata_url
toperiodic_table
docstring.Structure.from_xyz
andStructure.to_xyz
now support pulling additional (nonqcio_
) comments intoStructure.extras['xyz_comments']
and serializing these comments back into thexyz
string.Structure.from_xyz
andStructure.to_xyz
support pulling in and serializingqcio__identifiers_*
in thexyz
comments line.Structure.from_xyz_multi(xyz_str: str) -> List[Structure]
to return a list ofStructure
objects from a multi-structure xyz file.Structure.open
now supports multi-structure xyz files and will return a list of Structure objects.- New
CalcType.conformer_search
andConformerSearchResults
for conformer search calculations.
0.11.7 - 2024-07-27
- Documentation website available at https://qcio.coltonhicks.com/.
- Removed compatibility methods
Files.open_file
andFiles.open_files
. These now only exist atFiles.add_file
andFiles.add_files
.
0.11.6 - 2024-07-26
Structures.to_smiles
now correctly adds charge information the the SMILES usingrdkit
oropenbabel
.
0.11.5 - 2024-07-23
- Install all extra features with
pip install qcio[all]
. - Better error messaging if
qcio.view
is imported butview
dependencies are not installed. PeriodicTable.number(number: int) -> Atom
to lookup atoms by atomic number.- Multi-structure SMILES support for
Structure.from_smiles
usingOpen Babel
.struct = Structure.from_smiles("CCO.O.O", program="openbabel")
Structure.to_smiles()
to generate a canonical smiles string. Supported usingrdkit
oropenbabel
.Structure.add_smiles()
to addsmiles
and/orcanonical_smiles
toStructure.identifiers
. Can passsmiles
,canonical_smiles
,canonical_explicit_hydrogen_smiles
andcanonical_smiles_program
directly to this method. Alternatively, one can pass no values orprogram
andhydrogen
to generate and set SMILES automatically usingrdkit
oropenbabel
.
- Default force field for
Structure.from_smiles
changed fromUFF
->MMFF94s
. Structure._from_xyz
is now public and accepts anXYZ
string rather than a filepath.
0.11.4 - 2024-07-22
- Can pass
charge
andmultiplicity
toStructure.open("struct.xyz", charge=-1, multiplicity=3)
when openingxyz
files. Passing these values to files that already containcharge
ormultiplicity
will raise aValueError
.
0.11.3 - 2024-07-22
- Fixed
IndexError
when viewing an optimization that failed on the first gradient evaluation.
- Added
Wall Time
to theProgramOutput
table headed in inview.py
.
0.11.2 - 2024-07-20
-
Periodic Table with simple interface.
from qcio.constants import periodic_table as pt pt.He.symbol pt.He.number pt.He.name pt.Ht.mass pt.He.group pt.He.period pt.He.block pt.He.electron_confg group_6 = pt.group(6) period_3 = pt.period(3) # Check Data Source pt.data_source pt.data_url
constants._ELEMENTS
which was a short-term holdover until a periodic table could be added.
0.11.1 - 2024-07-19
- Added support for
titles_extra
andsubtitles_extra
to top-levelview.view
function. This allows users to pass additional data they want displayed after the default title (usuallyStructure.name
) is displayed.
0.11.0 - 2024-07-19
- ✨
view
✨ module that enables simple viewing ofStructures
andProgramOutput
objects for easy visual analysis and comparison in Jupyter Notebooks. Use withfrom qcio import view
and thenview.view(prog_output1, prog_output2, ...)
inside a Jupyter Notebook. SeeREADME.md
for more details.
- Refactored
ProgramOutput.files
into the.results
attribute:ProgramOutput
now inherits fromQCIOModelBase
.SinglePointResults
andOptimizationResults
inherit fromFiles
.- This means
SinglePointResults
andOptimizationResults
both returnTrue
forisinstance(obj, Files)
.
- This means
Files
has been added toResults
(a validResultsType
).- 🚨 BREAKING CHANGE: Removed awkward
NoResults
object fromqcio
. Realizing thatFiles
is the correct base case for.results
(files may exist for all failed or successful calculations) enabled this change. ProgramOutput.results: ResultsType
now has no default value.- This is more logically consistent with the idea that all program results--including files--are found at
.results
. Structured results objects likeSinglePointResults
andOptimizationResults
essentially parse out data from these files into structured data.FileInput
calculations behave just like structured calculations now with their outputs (the files produced by the program) available in.results
. This matches the metal model for input objects that start withFileInput
and then layer structure onto common values like.model
,keywords
, andcalctype
.- This means that
FileInput
calculations now produce aProgramOutput[FileInput, Files]
object instead of the formerProgramOutput[FileInput, NoResults]
object. This same change holds for failed single point calculations or failed optimization calculations with no computed results.
- This means that
- Added compatibility layer with
FutureWarning
message to preserve backwards compatibility for instantiatingProgramOutput
objects having.files
and accessingProgramOutput.files
on instantiated objects.
- Cleaned up
.final_energy
andfinal_structure
return values onOptimizationResults
.
Structure.extra
note about the structure being generated from a force field embedding when instantiated using.from_smiles(smiles: str)
.
0.10.5 - 2024-07-15
OptimizationResults.trajectory
may contain a series of successfulProgramOutput[..., SinglePointResults]
objects and then a failedProgramOutput[..., NoResults]
object. In this case we set the.energies
property of the last value tonan
for the failed calculation rather than0.0
.- Updated
QCIOModelBase.__repr_args__
so that.success
is always shown in the repr, even ifFalse
. - Updated
ProgramOutput.__repr_args__
to always show.success
first. This helps withProgramOutput[..., OptimizationsResults]
where it isn't immediately obvious the calculation has failed from the printed string because.results
isn'tNoResults
.
0.10.4 - 2024-07-15
ensure_results
validator toSinglePointResults
to enforce that eitherenergy
,gradient
orhessian
must be set. I.e., one cannot have an emptySinglePointResults
object--this should instead beNoResults
.ensure_noresults_on_failure_for_single_point
toProgramOutput
so that setting.success=False
and.results=SinglePointResults
is an invalid state.
0.10.3 - 2024-07-13
Molecule
now correctly inherits fromStructure
for backwards compatibility.
0.10.2 - 2024-07-12
OptimizationResults.to_xyz()
to convert the trajectory to anxyz
multi-structure format.
- Reverted back to using
Structure.identifiers
rather thanStructure.ids
. There is an@property
onStructure
forids
for shorthand in end user cases. Added compatibility shim for passingids
upon instantiation so should not be a breaking change. - Reverted
Identifiers
to being immutable. While it's nice to be able to set.name
dynamically in a Jupyter Notebook for display purposes, I realized that variable names in notebooks are often reused and it becomes too easy to accidentally rename structures to something unintended. Perhaps better to keep everything immutable. Maybe add a feature likeProgramOutput.add_display_name(...)
or something akin to this for in-the-moment view modifications. This data would not be persisted upon saving.
0.10.1 - 2024-07-10
- Fixed a depreciated use of
Structure.identifiers
instead ofStructure.ids
.
0.10.0 - 2024-07-10
- A number of additional constant values.
constants._SOLVENTS_DIELECTRIC
for a number of common solvents.Structure.from_smiles
to create a 3D structure from a smiles string.
- Updated
BOHR_TO_ANGSTROM
from0.529177210903
to0.529177210544
in accordance with https://physics.nist.gov/cgi-bin/cuu/Value?bohrrada0 - Renamed
Molecule
toStructure
to better suggest that the coordinates may represent a superstructure comprised of many molecules. Maintained backwards compatibility for passingProgramInput(..., molecule=Structure(...))
, and for accessingprog_input.molecule
with depreciation warnings. - 🚨 Breaking Change:
OptimizationResults.energies
returns anp.array
now instead of alist[float]
. This makes it easier for converting the energies to other units likekcal/mol
. - 🚨 Breaking Change:
Identifiers.name_common
renamed toname
for simplicity. - 🚨 Breaking Change: Renamed
Structure.identifiers
->Structure.ids
to reduce verbosity. - Made
Identifiers
object directly modifiable so one can add names and smiles to structures easily withmystruc.ids.name = 'my name'
ormystruct.ids.smiles = 'CCO'
.
0.9.3 - 2024-06-13
- Registration of all concrete
ProgramOutput[InputType, ResultsType]
on theoutputs.py
module sopickle
can find the classes for serialization and deserialization withincelery
. The previous approach of registering classes upon instantiation of a class did not work because of multiple processes running incelery
. The worker process in which the class was instantiated had the class atoutputs.ProgramOutput[...]
however the main process would sometimes need to serialize an object and it would not be in theoutputs.py
module. The former approach appeared to work better than I thought because declaring classes as types for atrajector
registered them on theoutputs.py
module without my realizing it.
0.9.2 - 2024-06-12
precision
argument toMolecule.save()
method to control the decimal precision of the xyz file output. Default is 17 decimal places to capture allfloat64
precision.
- Added
GetPydanticSerializer
annotation toSerializableNDArray
to create the correct json docs for ChemCloud (or any other json schema generator). - Added
BeforeValidator
toSerializableNDArray
to coerce all arrays tofloat64
for consistency.
0.9.1 - 2024-06-11
- Changed decimal precision of
Molecule.to_xyz()
string representation of geometry values to 17 decimal places to capture allfloat64
precision.
0.9.0 - 2024-04-23
Molecule.atomic_numbers
property which usesqcio.constants.ELEMENTS
to map atomic symbols to atomic numbers.- Generic
ProgramOutput[InputType, ResultsType]
class to handle all program outputs.
THIS IS A BREAKING RELEASE DUE TO THESE REMOVALS! Trying to maintain core end-user API though.
from_qcel_output
function that is no longer needed since I only need to parse out the results fromQCElemental
objects.- 🚨 BREAKING CHANGE:
calctype_to_output
since all outputs are nowProgramOutput
objects parameterized by their input type and results type. test_input_to_output_from_qcel_failed_operation
test since we only parse results fromQCElemental
objects and don't need to parseFailedOperation
objects.ArrayLike3D
type hint since we are specifically accepting onlyNDArray
types for all numpy arrays (instead of previously acceptingList[List[List[float]])
as well) and the dimensionality (shape) cannot be enforced at the type level. All array shapes are enforced by validators and noted as comments.- Unused
SPReturnType
type hint.
- 🚨 BREAKING CHANGE: Inheritance hierarchy for inputs changed to
ProgramInput(FileInput, ...)
,DualProgramInput(ProgramInput, ...)
. Specifically, all inputs are subclasses ofFileInput
now. Soisinstance(obj, FileInput)
that previously returnedFalse
forProgramInput
andDualProgramInput
objects (which were not children ofFileInput
) now return True. Update these checks toif type(obj) is FileInput
to retain the original behavior. - 🚨 BREAKING CHANGE: While a
ProgramFailure
object is provided for end-user backwards compatibility, because of varying Generics parameters, previousisinstance(obj, ProgramFailure)
checks that used to returnTrue
will now returnFalse
. Check for "equality" to oldProgramFailure
objects withif obj.success is False
instead.
0.8.2 - 2024-04-09
constants.ELEMENTS
mapping of atomic numbers to element symbols. In anticipation of supportingxtb
inqcop
which uses atomic numbers instead of element symbols.
0.8.1 - 2024-03-29
py.typed
file to enable type checking in other projects that useqcio
.
- Updated
black
. - Added
fix_com=True
andfix_orientation=True
to default conversion fromqcio.Molecule
toqcelemental.Molecule
objects so that qcel doesn't translate or rotate the molecule unsuspectingly without the user's consent. See default behaviors here. - Renamed
SubProgramArgs
toSubProgramInput
to be more consistent with the naming convention of the other input objects.
0.8.0 - 2024-01-12
OptimizationOutput.save("filename.xyz)
now save the trajectory to an xyz file.
- Saved Molecule xyz files now end with a
\n
character.
0.7.1 - 2023-09-27
- Add validation to
Molecule.symbols
so that all symbols will be capitalized, e.g.,NA
->Na
,h
->H
, etc.
Molecule._to_xyz()
is now a public methodMolecule.to_xyz()
that returns an xyz string rather than writing an xyz file to disk.- Hoisted
utils.json_dumps
toqcio.json_dumps
for easier import.
0.7.0 - 2023-09-19
- README.md documentation for basic library utilization.
- Renamed
DualProgramArgs
toSubProgramArgs
. - Updated
dev-decisions.md
documentation.
0.6.1 - 2023-09-08
- Removed
.traceback
from__repr_args__
ofProgramFailure
so object is more human-readable in an interactive session.
0.6.0 - 2023-09-08
- Renamed methods
.write_files()
->save_files()
,.add_file()
->.open_file()
,add_files()
->.open_files()
to keep a more consistent convention with.save*
dumping objects to disk and.open*
opening files on disk.
0.5.1 - 2023-09-02
qcio.utils.json_dumps
for serializingpydantic
objects or lists of objects. Helpful for serializing requests to send of HTTP.typos
pre-commit check.@classmethod
decorator to@field_validator
functions as per pydantic docs.SinglePointResults.scf_dipole_moment
.
- Removed invalid objects in
qcio.__init__.py.__all__
.
model.save()
now saves json withindent=4
by default.
0.5.0 - 2023-08-31
- Updated
pydantic
fromv1
->v2
.
0.4.2 - 2023-08-18
DualProgramArgs
object.
0.4.1 - 2023-07-20
final_molecule
lookup now returnsNone
if.trajectory
is empty rather than raisingIndexError
.
0.4.0 - 2023-07-19
- Changed
Provenance.working_dir
->scratch_dir
.
0.3.5 - 2023-07-18
- Dropped
.energies
and.molecules
onOptimizationResult
in favor of@property
lookups on the.trajectory
attribute. If memory utilization really becomes an issue consider optimizing in future by creating attributes of.energy
or.molecules
with smaller memory footprint.
0.3.4 - 2023-07-18
- Dropped
results.py
file and moved all results objects tooutputs.py
to remove circular dependency.
0.3.3 - 2023-07-17
- Fixed
SinglePointResult.normal_modes_cartesian
to be proper 3D structure with xyz displacements for each atom for each normal mode.
from_qcel_output
now overwrites the core results value with.return_result
sinceQCElemental
does not always write energy/gradient/hessian values toAtomicResult.properties
.
0.3.2 - 2023-07-17
Molecule.dict()
raised exception if.connectivity
did not exist sincesuper().dict()
removes empty collections for serialization.
0.3.1 - 2023-07-17
Molecule.connectivity
forrdkit
and other MM package support that depends on explicitly defined bonds.
0.3.0 - 2023-07-17
- Dropped
.program_args
nesting from input objects in favor of a flatter model structure. This makes defining inputs much quick/easier. - Renamed
calc_type
->calctype
. - Change computational model to use
ProgramInput
andDualProgramInput
instead ofSinglePointInput
andOptimizationInput
to enable more flexibility in the future. - Added frequency analysis values to
SinglePointResults
object.
0.2.1 - 2023-06-29
- Removed mistaken call to
print()
leftover from debugging.
0.2.0 - 2023-06-29
wall_time
,hostcpus
,hostname
,hostmem
toProvenance
pstdout
andptraceback
as aliased attributes onOutput
andFailedOutput
to quickly print out the values for easier viewing.Molecule.formula
property to return Hill System molecular formula.- Serialization support for
yaml
andtoml
in.save()
and.open()
methods. - Compatibility for
QCElemental
.SinglePointInput
objects can now run.to_qcel()
to return adict
representation of anAtomicInput
and.to_output_from_qcel
to convert adict
representation of anAtomicResult
orFailedOperation
to aSinglePointSuccessfulOutput
orSinglePointFailedOutput
object.
- Changed
Provenance.working_dir
fromstr
->Path
0.1.0 - 2023-06-28
- Core models for Single Point calculations:
FileArgs
FileInput
FileSuccessfulOutput
FileFailedOutput
Provenance
Model
SPCalcType
SinglePointProgramArgs
SinglePointInput
SinglePointSuccessfulOutput
SinglePointFailedOutput
SinglePointComputedProperties
Wavefunction