Release notes¶
Overview¶
The Cambridge Structural Database (CSD) is a highly curated and comprehensive repository of organic and organo-metallic crystal structures and is an essential resource to scientists around the world.
The Cambridge Structural Database Portfolio (CSD Portfolio) is a powerful and highly flexible suite of software components and structural knowledge-bases. The CSD Portfolio enables exploration and application of the knowledge contained within more than a million curated crystal structures.
The CSD Portfolio enables scientists to work with structural data to extract new insights. This includes public and proprietary, experimental, and predicted data. Our software supports scientific discovery, development, and analysis, and is trusted by thousands across industry and academia.
The CSD Python API has been developed to make the CSD Portfolio data and functionality accessible in a programmatic fashion. It facilitates integration with in-house work-flows and 3rd party applications. In addition, the CSD Python API can be used to perform activities not currently possible through the graphical interfaces. It is a platform for innovation.
Searchable documentation is available on at https://www.ccdc.cam.ac.uk/docs/csd_python_api/
Any feedback on the CSD Python API may be sent to support@ccdc.cam.ac.uk.
Citing the CSD Python API¶
When publishing works that benefited from the CSD Python API, please use the following citation:
“What has scripting ever done for us? The CSD Python application programming interface (API)”Richard A. Sykes, Natalie T. Johnson, Christopher J. Kingsbury, Jürgen Harter, Andrew G. P. Maloney,Elna Pidcock, Isaac J. Sugden, Suzanna C. Ward, Ian J. Bruno, Stewart A. Adcock, Peter A. Wood,Patrick McCabe, Alexandru A. Moldovan, Francis Atkinson, Ilenia Giangreco and Jason C. ColeJournal of Applied Crystallography, in press.
When publishing works that made use of the CSD itself, please use the following citation:
“The Cambridge Structural Database”C. R. Groom, I. J. Bruno, M. P. Lightfoot and S. C. Ward, Acta Crystallographica Section B, B72, 171-179, 2016
For further citation advice, refer to your download agreement and visit https://www.ccdc.cam.ac.uk/support/product_references/
Licensed Features¶
Some features are conditionally available depending on the user’s CSD licence.
API Module |
CSD-Core |
CSD-Materials |
CSD-Discovery |
CSD-Theory |
CSD-Particle |
---|---|---|---|---|---|
y |
y |
y |
y |
y |
|
y |
y |
y |
y |
y |
|
|
y |
y |
y |
y |
y |
y |
y |
y |
y |
y |
|
y |
y |
y |
y |
y |
|
y |
y |
y |
y |
y |
|
y |
y |
y |
y |
y |
|
y |
y |
y |
y |
y |
|
y |
y |
y |
y |
y |
|
y |
y |
y |
y |
y |
|
y |
y |
y |
y |
y |
|
y |
|||||
y |
|||||
y |
|||||
y |
|||||
y |
|||||
y |
|||||
|
y |
||||
y |
*1
The crystal packing similarity API is available to CSD-Materials users.
*2
The powder pattern simulation and comparison API, Morphology API, HBond Coordination API, and
HBond Propensity API are available to CSD-Materials users. Habit API is available to
CSD-Particle users.
*3
The Conformer Generation API is available to CSD-Materials and CSD-Discovery users, as well as some stand-alone
packages.
*4
The Interaction Map Analysis API is available to CSD-Materials and CSD-Discovery users.
*5
Landscape Generator is available as an add-on to CSD-Materials, CSD-Discovery and CSD-Enterprise users, as well
as some stand-alone packages.
CSD-Enterprise users have access to the combined CSD-Discovery and CSD-Materials feature sets.
Change Log¶
3.3.0¶
Major new features¶
Support for Python 3.11 added
Support for Python 3.7 removed
- Improvements to disorder handling, including:
All CCDC tools work with the different disorder assemblies and groups
All CCDC tools work consistently with structures containing disorder
Performance improvements when using the disorder analyser
Minor new features¶
Update the VdW radii to use Alvarez (2013) values. https://doi.org/10.1039/C3DT50599E
3.2.1¶
Bug fixes¶
Fixed issue where on exit Python would emit a QEventDispatcherWin32 message.
Fixed issue running Mercury solvate prediction and crystallisability prediction API scripts.
3.2.0¶
Minor new features¶
ccdc.descriptors.CrystalDescriptors.PowderPattern.from_xye_file()
will return a powder pattern with wavelength and two theta settings values extracted from the file.new method
ccdc.crystal.Crystal.copy()
to make a deep copy of the crystal.new method
ccdc.protein.Protein.assign_unique_chain_identifiers()
to re-assign chain identifiers to proteins so each discontiguous chain has its own chain ID.
3.1.0¶
Minor new features¶
New methods to add or remove hydrogens added to
ccdc.crystal.Crystal
. By adding hydrogens through the Crystal interface, a user will get more plausible positions for flexible hydrogens that make hydrogen bonds within the crystalline environment where possible.
Significant improvements¶
The performance of
ccdc.crystal.PackingSimilarity
has been improved when handling crystal structures with high internal symmetry.
3.0.18¶
Minor new features¶
ccdc.io.EntryWriter
and related file writers can be created with aformat='cif'
orformat='mmcif'
parameter to determine which of CIF or mmCIF formats should be written to a “.cif” file.
Bug fixes¶
If no format parameter is specified, “.mol2” files read and rewritten as “.cif” files are now written with CIF format, unless the data was clearly protein structure in which case mmCIF format is used.
Fixed issues related to missing files in some circumstances when doing hydrogen bond propensities calculation and interaction map analysis.
3.0.17¶
Major new features¶
- New module
ccdc.solid_form
added which include the following features: ccdc.solid_form.SolvateAnalyser
for solvate analysisccdc.solid_form.AromaticsAnalyser
for aromatics analysis
- New module
Enhanced support in
ccdc.protein.Protein.from_file()
,ccdc.io.EntryReader
, and related file readers, for reading protein crystal structure data from mmCIF files.Support in
ccdc.io.EntryWriter
, and related file writers, for writing protein crystal structure data into mmCIF files.
Minor new features¶
ccdc.interaction.HydrogenBondStatisticsSearch.HydrogenBondStatistics
has many more new properties giving various information of the hydrogen bond.ccdc.crystal.Crystal
has a new propertyccdc.crystal.Crystal.inverted_structure
that returns a crystal with inverted crystal structure.ccdc.csp.csd_landscape_generator.CSDLandscapeGenerator
will not replace existing structures in an existing landscape, but will extend it with new structures if more are required.ccdc.crystal.PackingSimilarity.Settings.timeout_ms
added to allow a timeout to be set for the packing similarity calculation.ccdc.csp.csd_landscape_generator.CSDLandscapeGenerator.Settings.maximum_number_of_conformers
enables conformer generation as a prelude to crystal structure prediction.ccdc.csp.csd_landscape_generator.CSDLandscapeGenerator.Settings.external_minimiser
allows an external crystal minimiser program to be used within landscape generation.
3.0.16¶
Major new features¶
ccdc.crystal.Crystal.disorder
added to return an instance of theccdc.crystal.Crystal.Disorder
class for working with analysed disorder of the crystal structure. Note thatccdc.crystal.Crystal.molecule
now returns a molecule with a different atom order if the crystal structure has disorder.ccdc.descriptors.CrystalDescriptors.PoreAnalyser
class added for Pore Analysis.
Bug fixes¶
fixed Labels on SMARTS dont work with recursive SMARTS.
3.0.15¶
Major new features¶
ccdc.molecule.Molecule.generate_inchi()
,ccdc.crystal.Crystal.generate_inchi()
andccdc.descriptors.MolecularDescriptors.InChIGenerator
added for generation of InChIs, along with associated example scripts.ccdc.crystal.Crystal.orthogonal_to_fractional()
andccdc.crystal.Crystal.fractional_to_orthogonal()
to return the transformations mapping between orthogonal and fractional coordinates in a crystal cell.
Minor new features¶
ccdc.search.QueryAtom
has a new propertyccdc.search.QueryAtom.chirality
that can be set to constrain the chirality of a matched atom during substructure search.ccdc.search.QueryBond
has a new propertyccdc.search.QueryBond.stereochemistry
that can be set to constrain the stereochemistry of a matched bond during substructure search.ccdc.search.SubstructureSearch.Settings
has a new propertyccdc.search.SubstructureSearch.Settings.match_enantiomers
that controls whether a substructure search allows matching on chiral enantiomers.ccdc.search.MoleculeSubstructure
has a new constructor argument match_stereochemistry that controls whether the substructure adopts stereochemistry constraints from the input molecule.Stereochemistry information is now read from 2D V3000 MolFiles and CDXML files.
ccdc.crystal.Crystal.molecular_shell()
has a new parameter, include_central, which makes the returned shell include the central molecules.ccdc.protein.Protein.from_file()
,ccdc.io.EntryReader
and related file readers can read protein crystal structure data from mmCIF files.ccdc.diagram.DiagramGenerator
can output ChemDraw XML.
Bug fixes¶
R/S chirality flags are now assigned correctly to sulfoxides read from SMILES.
3.0.14¶
Minor new features¶
ccdc.protein.Protein
The methodccdc.protein.Protein.normalise_labels
has been specialised for proteins so that by default the resultant labels are PDB format compliantccdc.protein.Protein
has had a new method addedccdc.protein.Protein.labels_compliant
has been added that returns true if the labels are PDB format compliantccdc.descriptors.MolecularDescriptors.Overlay
has a new constructor argument match_elements which determines whether elements must be matched in the overlayccdc.descriptors.MolecularDescriptors.Overlay
has a new propertyccdc.descriptors.MolecularDescriptors.Overlay.atom_match
returning the atom match used in the overlay
3.0.13¶
Major new features¶
- New module
ccdc.particle
added which include the following features: ccdc.particle.Surface
surface analysis returning chemical and topological descriptors.ccdc.particle.SlipPlanes
identification of potential slip planes.
- New module
- New module
ccdc.morphology
added which includes the following features: ccdc.morphology.BFDHMorphology
calculate morphology using BFDH model.ccdc.morphology.VisualHabit
calculate attachment energy based morphology and calculate lattice energy.
- New module
A new
ccdc.interaction.InteractionMapAnalysis.SurfaceSettings
class and a newccdc.interaction.InteractionMapAnalysis.analyse_surface()
function may be used to calculate full interaction maps on a given surface.Solubility data available via the Solubility Platform
Significant improvements¶
- The SMARTS parser in
ccdc.search
has been significantly upgraded.ccdc.search.SMARTSSubstructure
now: Supports recursive SMARTS.
Supports component level SMARTS.
Supports the vast majority of atomic primitives.
Supports a more complex bond logic allowing for AND/OR combinations.
Supports exotic hydrogen atoms to allow, for example, for bridging hydrogen searching.
Has been made more conformant to the standard definition to remove atomic ambiguities.
Has had several bugs fixed (for example ring closures are properly supported now.)
Has had some speed improvements in the resultant searches.
- The SMARTS parser in
For more information see the descriptive documentation on SMARTS
Deprecations¶
Substructure XML is deprecated. This includes QuerySubstructure.write_xml, XMLSubstructure, Substructure.from_xml, Substructure.from_xml_file, Substructure.read_xml and Substructure.read_xml_file. If you need this functionality, please contact support@ccdc.cam.ac.uk to let us know.
ccdc.descriptors.CrystalDescriptors.Morphology
is deprecated and will be removed in a later version. Please useccdc.morphology.BFDHMorphology
instead.ccdc.descriptors.MolecularDescriptors.overlay()
is deprecated and will be removed in a later version. Please use :class: MolecularDescriptors.Overlay.ccdc.descriptors.MolecularDescriptors.overlay_rmsds_and_transformation()
is deprecated and will be removed in a later version. Please use :class: MolecularDescriptors.Overlay.
3.0.12¶
Major new features¶
New modules
ccdc.csp.csd_landscape_generator
,ccdc.csp.database
andccdc.csp.prediction
are added.
Minor new features¶
ccdc.io.EntryWriter
will replace existing entries with the same identifier in csdsql format databases, rather than raising an exception if an entry with that identifier already exists.ccdc.io.EntryWriter
can remove entries from csdsql format databases.ccdc.search.TextNumericSearch
can be created and used without the CSD being presentccdc.protein.Protein
has had a new method added to allow sorting of atoms by residue. Seeccdc.protein.Protein.sort_atoms_by_residue
Bug fixes¶
an off-by-one error in cavity atom definitions when reading & writing gold configuration files has been fixed. This would manifest itself as an out-of-range exception if the last atom in an input protein file was included as part of the cavity.
3.0.11¶
Minor new features¶
The powder pattern simulation class
ccdc.descriptors.CrystalDescriptors.PowderPattern
now supports simple preferred orientation corrections in line with the graphical functionality in MercurySupport for FIMs on surface calculations. See the ccdc_addopt package for details.
Improved performance and resolution of opt-in telemetry.
Added feature to simulate preferred orientation in powder patterns, matching existing feature in Mercury
Bug fixes¶
Fixed issues by protecting CIF opening against things which are not CIF
3.0.10¶
Limited release for CSPC-IP consortium. CSP features added.
3.0.9¶
Major new features¶
Experimental support for Python 3.8 and 3.9 added
A new
ccdc.io.Subsets
class as a simple way to access pre-defined CSD subsets.
Minor new features¶
Removed six requirement
Hydrogen addition to
ccdc.molecule.Molecule
can now be sitelessSolvent accessible area calculations in
ccdc.molecule.Molecule
can calculate the accessible surface area in contact with another molecule only
3.0.8¶
Major new features¶
LD_LIBRARY_PATH, DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH do not need to be set during installation anymore. The only exception is LD_LIBRARY_PATH may be required for CentOS 7.
Substructure searches now work for structures with no coordinates.
Hydrogen Bond Statistics features added. See
ccdc.interaction.HydrogenBondStatistics
3.0.7¶
Major new features¶
GOLD Docking API significantly expanded
- Ability to specify water molecules that are important to ligand binding.
Model protein flexibility by allowing side chains to rotate within user-defined bounds during docking. -
ccdc.docking.Docker.Settings.RotamerAngleRange
-ccdc.docking.Docker.Settings.Rotamer
-ccdc.docking.Docker.Settings.RotamerLibrary
-ccdc.docking.Docker.Results.DockedLigand.ProteinRotatedTorsion
Pharmacophore constraint added to bias docking towards solutions in which particular regions of the binding site are occupied by specific types of ligand atom. -
ccdc.docking.Docker.Settings.PharmacophoreConstraint
ccdc.molecule.Molecule
supports conversion to and from SMILES strings with stereochemistry. -ccdc.molecule.Molecule.from_string()
can take ‘smiles’ as a format parameter. -ccdc.molecule.Molecule.to_string()
can take ‘smiles’ as a format parameter.Conformer generation accepts input molecules without initial 3D coordinates and adds missing hydrogen atoms.
Minor new features¶
Additional GOLD Docking configuration flags have been exposed: -
ccdc.docking.Docker.Settings.flip_planar_nitrogen
-ccdc.docking.Docker.Settings.flip_free_corners
-ccdc.docking.Docker.Settings.flip_amide_bonds
-ccdc.docking.Docker.Settings.flip_pyramidal_nitrogen
-ccdc.docking.Docker.Settings.save_lone_pairs
-ccdc.docking.Docker.Settings.match_template_conformations
-ccdc.docking.Docker.Settings.rotate_carboxylic_hydroxyl_groups
-ccdc.docking.Docker.Settings.use_torsion_angle_distributions
-ccdc.docking.Docker.Settings.fix_ligand_rotatable_bonds
-ccdc.docking.Docker.Settings.rotatable_bond_override_file
-ccdc.docking.Docker.Settings.fix_all_protein_rotatable_bonds
-ccdc.docking.Docker.Settings.solvate_all
-ccdc.docking.Docker.Settings.use_internal_ligand_energy_offset
3.0.5¶
Major new features¶
Support for macOS 11 Big Sur.
XQuartz is no longer a dependency for macOS.
3.0.4¶
Major new features¶
Remove requirement for an accessible X server on Linux.
Bug fixes¶
Fixed diagram generator gives blank diagrams for some molecules.
Fixed docking API fails on Windows trying to write files with ‘:’ in file name.
Improved histogram binning for torsion fragments
3.0.3¶
Major new features¶
The CSD Python API will now operate, where appropriate, in the absence of the CSD data.
Remove requirement for an accessible X server on Linux.
Minor new features¶
Raise exception when accessing out-of-bounds grid points in grid API.
Use a fixed range for torsion histograms during geometry analysis.
Fix import of attributes from SDFile and Mol2 files containing structures with non-unique identifiers.
Fix export of Mol2 files for structures with no attributes.
Fix syntax of CCP4 files.
Fix detection of intermolecular hydrogen bond pairs as observed if between molecules within the asymmetric unit.
Examples¶
hydrogen_bond_propensity_report.py - Write Hydrogen bond propensities calculation in docx report
multi_component_hydrogen_bond_propensity_report.py - Write multi-component hydrogen bond propensities calculation in docx report
3.0.2¶
Minor new features¶
ccdc.molecule.Bond.length
method to return bond length in Angstroms.ccdc.io.EntryReader
and related readers can read gzip compressed files which have “.gz” appended to the filename.
Backwards incompatible changes¶
Python 2.7 was officially at its end-of-life on 1st January 2020. New versions of the CSD Python API no longer support Python 2.7.
3.0.1¶
Minor new features¶
new
ccdc.descriptors.MolecularDescriptors.AdjacencyMatrixDescriptorCalculator
to calculate molecular descriptors based on the adjacency matrix.new
ccdc.descriptors.MolecularDescriptors.ConnectivityIndices
to calculate molecular connectivity index descriptors.new
ccdc.descriptors.MolecularDescriptors.AtomPairDistanceDescriptorCalculator
to calculate molecular descriptors based on atom pairs at a specified bond distance.
3.0.0¶
Minor new features¶
new
ccdc.utilities.ApplicationInterface
to make interfacing the CSD Python API with external applications easier.new
ccdc.utilities.HTMLReport
class for simplifying HTML reports for Mercury and Hermes API scripts.there are methods on a
ccdc.search.SubstructureSearch.SubstructureHit
to allow the definitions and atoms of a the measurements, constraints and geometric objects of a hit to be inspected.there is a method,
ccdc.cavity.Cavity.write()
which will write a Hermes-compatible rlbcoor file from a cavity if the cavity has been read from a PDB file.there is a new static method,
ccdc.protein.Protein.known_cofactor_codes()
that provides a list of cofactor 3-letter codes that are recognised by the python APIccdc.search.QueryAtom.label_match
can be set to a regular expression. This will be used to constrain a search for an atom to only hit the atoms that match it.an exception is no longer raised on opening a database with an identifier list containing identifiers missing from the database, instead an exception will be raised when missing entries are accessed.
Deprecations¶
CCDC licensing no longer uses a file-based implementation, the
ccdc.utilities.Licence.files
property is deprecated.
Additional Examples¶
cavity_pair_view.py - a simple new demonstration script that shows how to superimpose pairs of proteins based on their cavities.
2.3.0¶
Major new features¶
There is a new class,
ccdc.interaction.InteractionMapAnalysis
for the analysis of small molecule and protein interaction preferences. Please see Interaction Maps for details.
Minor new features¶
ccdc.pharmacophore.Pharmacophore.Query.intra_only
now operates as the GUI’s IntraOnly toggle to define distance constraintsccdc.pharmacophore.Pharmacophore.SearchHit.constraint_values()
gives access to the measured values of distance constraints in theccdc.pharmacophore.Pharmacophore.Query
ccdc.pharmacophore.Pharmacophore.SearchHit.feature_points()
gives access to the points of the search hit associated with a particular featureccdc.pharmacophore.Pharmacophore.PointGenerator.feature_points()
gives access to the points defined by the point generatorccdc.descriptors.GeometricDescriptors.Vector
now has dot and cross product methodsccdc.descriptors.GeometricDescriptors.Plane
now has attributes, plane_vector1 and plane_vector2 giving vectors in the plane normal to each other and normal to the plane’s normal.
2.2.0¶
Major new features¶
ccdc.search.CombinedSearch
allows the set-theoretic combination of searches. See Combined searches for details.
Minor new features¶
new attributes of a
ccdc.molecule.Atom.is_in_protein
andccdc.molecule.Atom.protein_atom_type
to provide information on atoms contained in a protein.new classes
ccdc.protein.Protein.NucleicAcid
andccdc.protein.Protein.Nucleotide
added, along with propertiesccdc.protein.Protein.nucleic_acids
andccdc.protein.Protein.nucleotides
.ccdc.utilities.Grid
now has a division operator. This will raise ZeroDivisionError if any value of the dividend is 0.0.a ligand or cofactor extracted from a
ccdc.protein.Protein
has an attribute, ‘is_covalent’ indicating whether the ligand is covalently bound to a chain atom.there is a new property,
ccdc.protein.Protein.cofactors
which gives access to the cofactors associated with a protein, differentiated from ligands.there is a new attribute,
ccdc.molecule.Atom.chain_label
to identify in which chain an atom is located.
2.1.0¶
Minor new features¶
entries read from a CIF file now have access to the global_data block of the entry in
ccdc.entry.Entry.global_attributes
if present in the CIF.ccdc.utilities.Grid.to_dict()
provides a dictionary keyed by values on the grid, with values those indices at which the value may be found.there is a new method,
ccdc.utilities.Grid.to_vector()
which will return a tuple of grid values suitable for constructing numpy arrays.the method
ccdc.utilities.Grid.set_sphere()
has a new keyword argument to control the mode of assignment to values in the grid.there is a new method,
ccdc.molecule.Atom.solvent_accessible_surface()
giving the proportion of an atom’s surface area accessible to a spherical probe of given radius.there is a new property,
ccdc.molecule.Atom.occupancy
indicating the occupancy of an atom. See Disordered Structures and Suppressed Atoms for details.
Bug fixes¶
the implementation of
ccdc.entry.Entry.deposition_date
has been corrected to return the date an entry was deposited in the CSD.
2.0.0¶
Backwards incompatible changes¶
ASER format databases are no longer supported. If you have databases that do not now work with the CSD Python API, you can contact your local in-house database manager, or you can contact support@ccdc.cam.ac.uk to receive assistance in converting your files to the new format.
Creation of SubstructureSearch and SimilaritySearch screens for speeding up searches of large, non-CSD databases is no longer supported. Please convert your databases to csdsql format databases where the screens are built-in.
ccdc.io.EntryReader
when created with a list of identifiers will raise a RuntimeError if any of the identifiers is not present in the underlying database.
Deprecations¶
ccdc.MolecularDescriptors.overlay_rmsd_and_rmsd_tanimoto()
has been deprecated and replaced with the methodccdc.MolecularDescriptors.overlay_rmsds_and_transformation()
, which also returns the overlay transformation matrix.
Major new features¶
the module
ccdc_rp.cavity
has been moved toccdc.cavity
.the class
ccdc_rp.descriptors.CrystalDescriptors.Morphology
has been moved toccdc.descriptors.CrystalDescriptors.Morphology
the class
ccdc_rp.descriptors.CrystalDescriptors.HBondCoordination
has been moved toccdc.descriptors.CrystalDescriptors.HBondCoordination
the class
ccdc_rp.descriptors.CrystalDescriptors.HBondPropensities
has been moved toccdc.descriptors.CrystalDescriptors.HBondPropensities
the class
ccdc_rp.protein.Protein.ChainSuperposition
has been moved toccdc.protein.Protein.ChainSuperposition
a new module
ccdc.pharmacophore
can be used to define pharmacophore models and to search a CSD-CrossMiner database of protein structures and CSD crystal structures, available to CSD-Discovery and CSD-Enterprise users.ccdc.io.EntryReader
now allows heterogeneous lists of files to be used to create a compound database which has all the functionality of a single database. See Working with multiple databases for details.numerous search performance improvements
Minor new features¶
ccdc.conformer.GeometryAnalyser.AnalysisHit
now has a property, similarity_score, to measure the similarity of the hit to the query fragment.ccdc.conformer.GeometryAnalyser.Settings
now has a property, powder_filter, to control whether or not to include fragments from powder study crystals.ccdc.descriptors.GeometricDescriptors.Sphere
has been added, representing a sphere in three-dimensional space.ccdc.utilities.Licence
has been added to provide information about the current licence.
Bug fixes¶
fix uninstallation of conda package.
improve detection of GOLD executable at less standard locations.
recognise cofactor atoms as part of the protein.
improve compatibility with PyQt module.
accept unicode identifiers in GCD lists.
allow uppercase filenames with lower-case list of pdb codes (JIRA GOLD-1082) when creating a cavity database with a identifier list filter.
1.5.3¶
Backwards incompatible changes¶
the attributes,
ccdc.crystal.Crystal.formula
andccdc.molecule.Molecule.formula
have changed in the way they handle structures with disorder. The former will give the formula taking account of occupancies; the latter will take account of occupancies if the molecule is disordered, but not otherwise.ccdc.docking.Docker.Settings.BindingSiteFromListOfResidues
when reading an existing conf file will interpret either ‘A:HIS123’ or ‘HIS123’ as long as ‘HIS123’ is unambiguous. If not it will raise a RuntimeError.
Minor new features¶
ccdc.molecule.Molecule.normalise_atom_positions()
allows a molecule to reorder its atoms canonically.ccdc.docking.Docker.Settings
now allows the specification of a scoring parameter file and a torsion distribution file.API tests are dependent on a specific CSD version being present, that may not match what the user has, may be skipped
Molecule and crystal formulas of disordered structures use occupancies giving fractional element counts
ccdc.__build__()
provides a unique build identifier.
Bug fixes¶
ccdc.search.SubstructureSearch.SearchHit.match_substructures()
has been revised to ensure the order of matched atoms in the returned molecule is preserved accords with the order of substructure atoms in the query.Fixed problem that on 64-bit Windows due to modified registry layout, a 32-bit API can have trouble locating the database and therefore a licence
1.5.2¶
Backwards incompatible changes¶
the method
ccdc.molecule.add_hydrogens()
will no longer add hydrogens to atoms in a polymeric bond, correcting an earlier error.
Minor new features¶
there is a new method,
ccdc.molecule.Atom.is_in_line_of_sight()
which checks whether a pair of atoms is occluded by a third. See line-of-sight for details.ccdc.descriptors.StatisticalDescriptors.RankStatistics
additionally accepts string identifier to specify activity classifications.All search classes raise exceptions when from_xml_file methods called with non-existent XML file.
the method
ccdc.utilities.Timer.progress()
now takes an optional argument specifying that the output should be written in place, overwriting previous output.There is a new property,
ccdc.search.Search.SearchHit.identifier()
to access the string identifier for the hit.Fail earlier (at import time) for bad installations with helpful error messages for: - Python versions other than 2.7.x - 64-bit install into 32-bit Python environment, or vice versa. - UCS2 install into UCS Python environment, or vice versa.
Bug fixes¶
Fix diagram generation segmentation fault on Linux platforms with NVidia graphics drivers (BZ17616)
Fixed bug that multiple covalently-bound ligands with the same chain identifier were treated as a single ligand (Bug 18737)
Avoid rounding errors when comparing crystal contact lengths.
Fix incorrect licensing restrictions for Point and Vector.
Throw a runtime_error instead of seg faulting when incorrect atoms are provided for a substructure search centroid
Throw a runtime_error instead of seg faulting when illegal substructure indices specified in search
Give consistent errors when search XML files are missing, irrespective of Search class.
Fix stretching of grid files when saved using .grd format (BZ18734)
Fix
ccdc.search.SMARTSSubstructure
hit atom indexes don’t correspond to the substructure specification (Bug 18661)Fix calculation of crystal density where the Z’ is less than 1 (BZ16116)
FIx distance parameters read from CONNSER files were erroneously VdW-corrected (BZ18736)
1.5.1¶
Backwards incompatible changes¶
the module
ccdc.cavity
has been moved toccdc_rp.cavity
.when reading loops from the attributes of a CIF file, values which are deemed not significant will be replaced by None. Previously only the first item of the loop was checked.
Minor new features¶
the dict-like attributes of a CIF file now has a method,
ccdc.entry.Entry._CifAttributes.get_raw_item()
which will provide the literal text of a CIF value.the class
ccdc.docking.Docker.Settings
now has a property,ccdc.docking.Docker.Settings.fitting_points_file
which may be used to set an explicit fitting points file for the docking. If set to None, the default fitting points file will be used and written.the class
ccdc.entry.Citation
now has a __hash__ method compatible with its equality predicate so sets and dicts of Citations may be made.there ss is a new method,
ccdc.crystal.Crystal.atoms_on_special_positions()
which will return the atoms of the unit cell molecule lying on a symmetry axis.there is a new method,
ccdc.crystal.Crystal.centre_molecule()
which will ensure that the molecule of a crystal lies within the unit cell.the method,
ccdc.search.SubstructureSearch.SubstructureSearchHit.match_substructures()
will return a tuple ofccdc.molecule.Molecule
instances corresponding to the substructures add to theccdc.search.SubstructureSearch
instance.diagram generation may now specify a list of atoms whose labels will be displayed instead of their atomic symbols.
ccdc.descriptors.StatisticalDescriptors.RankStatistics
additionally accepts integer to specify activity classification column.
Bug fixes¶
“se” to represent aromatic Selenium (as in Selenophene) is now supported by the SMILES and SMARTS parsers.
:meth:’descriptors.MolecularDescriptors.point_group_analysis’ failed if called twice on same molecule.
:meth:’descriptors.MolecularDescriptors.point_group_analysis’ now deduces correct point group symmetry for BROFRM02.
1.5.0¶
Major new features¶
there are two new methods,
ccdc.crystal.Crystal.hbond_network()
andccdc.crystal.Crystal.contact_network()
allowing the construction of networks of molecules from the expansion of hydrogen bonds and close contacts. This provides the functionality of mercury’s ‘Build Network’ tab of the ‘Contacts’ dialogue. See Contact and HBond expansion for details.there are two new methods,
ccdc.crystal.Crystal.packing()
andccdc.crystal.Crystal.slicing()
which implement the construction of packing and slicing as in mercury. See Packing and Slicing for details.there is a new method,
ccdc.crystal.Crystal.polymer_expansion()
allowing the expansion of polymeric bonds. See Polymer Expansion for details.there is a new class,
ccdc.utilities.Grid
allowing reading, writing and manipulation of orthonormal grids. See Grids for details.the SQLite file distributed for use by the API contains over 200,000 entries that have anisotropic displacement parameters (ADPs), and nearly 2,000 further entries with isotropic displacement parameters. See
ccdc.molecule.Atom.DisplacementParameters
.
Minor new features¶
there is a new class,
ccdc.descriptors.StatisticalDescriptors.RankStatistics
that provides a mechanism for calculating common rank statistics that measure enrichment for a collection of scores with associated ‘activities’. See Statistical descriptors for details.there is a new class,
ccdc.descriptors.MolecularDescriptors.PrincipleAxesAlignedBox
which will calculate the bounding box of a molecule along its principle axes. See Principle axes aligned molecules for details.there is a new class,
ccdc.search.SubstructureSearch.HitProcessor
allowing hits from a substructure search to be processed as they are found by the underlying search, rather than waiting for the entire search to complete. See Interactive Hit Processing for details.there is a new
ccdc.utilities.Timer
for instrumented timing of python code, and with a useful progress reporting staticmethod.
1.4.0¶
Backwards incompatible changes¶
some of the names of
ccdc.interaction.InteractionLibrary.CentralGroup
have been changed to correct a bug in the handling of groups with distinct geometries, for example, ‘planar uncharged aromatic amino’ is now distinguishable from ‘pyramidal uncharged aromatic amino’.
Deprecations¶
The attribute
ccdc.conformer.ConformerSettings.normalised_score_threshold
is deprecated.
Major new features¶
the full range of binding site definitions and of constraints may be specified in
ccdc.docking.Docker.Settings
. See Binding Site Definition and Docking Constraints for details.
Minor new features¶
ccdc.crystal.Crystal
has a static method,ccdc.crystal.Crystal.symmetry_operator_description()
to provide a textual description of a symmetry operator.ccdc.search.TextNumericSearch
now allows an optionalccdc.search.TextNumericSearch.Settings
argument.ccdc.molecule.Molecule.set_residue_by_name()
allows disconnected components of a molecule to have separate residue labels.ccdc.molecule.Molecule.molecular_volume
is a property to calculate the molecular volume of the molecule, if all atoms have 3D coordinates.ccdc.descriptors.MolecularDescriptors.AtomDistanceSearch
provides rapid proximity detection for atoms of a molecule.ccdc.diagram.DiagramGenerator.image()
may now take an instanceccdc.search.QuerySubstructure
or one of its derived classes and will generate an image of the search substructure. Note that the highlight_atoms parameter must be a list of indices or a list ofccdc.search.QueryAtom
instances.the attribute
ccdc.docking.Docker.Results.ligands
now providesccdc.docking.Docker.Results.DockedLigand
instances providing slightly nicer access to the fitness and scoring terms of a docked ligand. See Inspecting results for details.ccdc.search.QueryAtom
has two new constraints, to test for the matched atom having 3D coordinates and to test for the atom having a given number of implicit hydrogens.ccdc.search.QuerySubstructure
has methods to test for a match against an atom or molecule:ccdc.search.QuerySubstructure.match_atom()
,ccdc.search.QuerySubstructure.match_molecule()
, andccdc.search.QuerySubstructure.nmatch_molecule()
.ccdc.search.SMARTSSubstructure
has a slightly augmented syntax to allow the representation of quadruple, delocalised and pi bonds using the symbols ‘_’, ‘”’ and ‘|’ respectively.ccdc.crystal.Crystal.hbonds()
has an extra parameter, unique, to select either the crystallographically unique hydrogen bonds or the the full set of hydrogen bonds. See Crystallographic Hydrogen Bonds for details.ccdc.molecule.Atom
has a property,ccdc.molecule.Atom.atomic_weight
for the standard atomic weight of the atom.ccdc.molecule.Atom
has a property,ccdc.molecule.Atom.fractional_uncertainties
for the fractional coordinates with uncertainty information where this has been recorded.ccdc.cavity.Cavity
now has methods to define subsets ofccdc.cavity.Cavity.Feature
and to define a subcavity based on a subset ofccdc.cavity.Cavity.Feature
s.ccdc.cavity.Cavity.Feature
now has properties for theccdc.protein.Protein.Chain
,ccdc.protein.Protein.Residue
andccdc.molecule.Atom
from which the feature derives if the cavity is created with PDB information.ccdc.cavity.Cavity.to_pymol_file()
will create a visualisation file that can be run in PyMol for viewing a cavity.ccdc.diagram.DiagramGenerator.Settings.element_coloring
is now available to specify whether elements will have a colour or be black.ccdc.descriptors.GeometricDescriptors.Vector
now has a property, length, for the length of the vector.
Bug fixes¶
Writing a protein containing atoms with unknown element types to PDB formatted-files now generates valid PDB format.
Reading proteins from Mol2 files now retains residue information.
There was a bug where
ccdc.search.SubstructureSearch.SubstructureHit.match_atoms()
could return atoms not in the same molecule. This has been fixed.The python Numpy module is no longer a prerequisite for the CSD Python API, leading to an easier installation experience for
pip
users.
1.3.0¶
Backwards incompatible changes¶
The
ccdc.entry.Citation
previously had a member,ccdc.entry.Citation.journal_name
which has been superseded by an instance of the newccdc.entry.Journal
.The
ccdc.descriptors.PowderPattern
has been removed, after deprecation in the previous release. Please useccdc.descriptors.CrystalDescriptors.PowderPattern
instead.Several methods and classes from
ccdc.cavity
have been removed following deprecation in the previous release.When reading a CIF file, bond information, even if present, will be ignored. This is for consistency with other CCDC programs.
Major new features¶
updated for CSDS 2017
Support for 64-bit Python on Windows.
There is a new class
ccdc.entry.Journal
which provides additional features for a journal referred to in citations of an entry.There is a new class
ccdc.entry.JournalList
holding the collection ofccdc.entry.Journal
in a database. See Journals for details.There is a new class
ccdc.crystal.Crystal.MillerIndices
and a methodccdc.crystal.Crystal.miller_indices()
to give access to the Miller indices of a crystal structure. See Miller Indices for further details.There is a new class,
ccdc.molecule.Molecule.HBondCriterion
which can be used to fine-tune the definition of what constitutes a hydrogen bond. This is used inccdc.molecule.Molecule.hbonds()
,ccdc.crystal.Crystal.hbonds()
and inccdc.descriptors.CrystalDescriptors.GraphSetSearch
. See Hydrogen Bonds for details.
Minor new features¶
ccdc.descriptors.CrystalDescriptors.PowderPattern.TickMark
now has a property giving theccdc.crystal.Crystal.MillerIndices
of the tick mark.PDB format files are now supported by
ccdc.io.MoleculeWriter
,ccdc.io.CrystalWriter
andccdc.io.EntryWriter
.ccdc.entry.Entry
now exposes the CCDC DOI throughccdc.entry.Entry.doi
.ccdc.entry.Entry
may now have multiple citations accessed throughccdc.entry.Entry.publications
. The original citation of the structure is still available asccdc.entry.Entry.publication
.ccdc.entry.Entry
now exposes the deposition date throughccdc.entry.Entry.deposition_date
.ccdc.entry.Entry
has a method that returns the chemical name as a formatted HTML stringccdc.entry.Entry.chemical_name_as_html
.ccdc.entry.Entry
has a method that returns any recorded synonyms as formatted HTML stringsccdc.entry.Entry.synonyms_as_html
.ccdc.io.EntryReader
,ccdc.io.CrystalReader
andccdc.io.MoleculeReader
may now take a string containing molecular data in mol2 or sdf format.ccdc.io.EntryReader
can now take a list of connection strings to form a pooled database. Pooled database can be used in the same manner as a single database.ccdc.entry.Entry
now exposes the database source name throughccdc.entry.Entry.database_name
.ccdc.search.ConnserSubstructure
now correctly handles distance and angle constraints over disjoint substructures.ccdc.search.TextNumericSearch
handles empty text search values safely and consistently by skipping those query terms.ccdc.molecule.Molecule
has a method to remove all partial charges. This allows formal charges, if present, to be represented in the charge field of a mol2 format file.ccdc.entry.Entry.from_string()
,ccdc.crystal.Crystal.from_string()
,ccdc.molecule.Molecule.from_string()
do not disregard specified format.
Bug fixes¶
ccdc.molecule.Molecule.from_string()
now produces a molecule which can be edited.
1.2.0¶
Deprecations¶
ccdc.descriptors.PowderPattern
has been moved into a new namespace, and now appears asccdc.descriptors.CrystalDescriptors.PowderPattern
. It is available under its old location for this release, for backwards compatibility, but will be available only in its new location for the next 1.3 release.
Major new features¶
There is now an implementation of Graph Sets in the API. See graph-sets for details.
ccdc.docking.Docker
now allows GOLD to be invoked for rescoring. See Rescoring for details.
Minor new features¶
ccdc.io
readers and writers now accept suffixes and formats in any case, for the convenience of Windows users.ccdc.molecule.Atom
now has access to atomic displacement parameters where these are recorded in the structure.ccdc.diagram.DiagramGenerator.Settings
now has settings to control the font family, the font weight and whether the font should be italic.ccdc.crystal.Crystal.has_disorder
may be used to determine whether or not a crystal is disordered.ccdc.entry.Entry.attributes
is now mutable, even when the entry represents a CIF structure. In these cases the attributes may be written to and read from a CIF file.ccdc.entry.Entry
has an attribute,ccdc.entry.Entry.calculated_density
which may be used when the corresponding crystal cannot calculate a density.ccdc.protein.Protein.add_hydrogens()
may be used to protonate protein structures.ccdc.protein.Protein.detect_ligand_bonds()
may be used to (re)detect bonds between ligand atoms in protein structures.ccdc.protein.Protein.Residue.__ne__()
method added.ccdc.docking.Docker
now writes config files into the output directory if no explicit config filename is specified.
Bug fixes¶
ccdc.protein.Protein.Residue.__eq__()
method now compares chain ID as well as residue sequence number.ccdc.protein.Protein.Residue.__lt__()
method now sorted on chain ID as well as residue sequence number.
1.1.1¶
Deprecations¶
ccdc.cavity.Cavity.RapmadPocket
has been deprecated in favour ofccdc.cavity.Cavity.PocketDistanceHistograms
.ccdc.cavity.Cavity.PocketDistanceHistograms.identifier
,ccdc.cavity.Cavity.PocketDistanceHistograms.nfeatures
andccdc.cavity.Cavity.PocketDistanceHistograms.feature_coordinates
have been deprecated.ccdc.cavity.Cavity.rapmad_pocket()
has been deprecated in favour ofccdc.cavity.Cavity.pocket_distance_histograms()
.ccdc.cavity.CavityDB.rapmad_pocket()
andccdc.cavity.CavityDB.rapmad_pockets()
have been deprecated in favour ofccdc.cavity.CavityDB.pocket_distance_histograms()
andccdc.cavity.CavityDB.pocket_distance_histogram_sets()
.ccdc.cavity.CavityDB.search_rapmad()
andccdc.cavity.CavityDB.search_cavbase()
have been deprecated in favour ofccdc.cavity.CavityDB.pocket_search()
andccdc.cavity.CavityDB.cavbase_search()
.
Minor new features¶
updated naming in experimental interface to protein cavities. See
ccdc.cavity
.
1.1.0¶
Backwards incompatible changes¶
molecules read from a database no longer raise an exception if there are no atoms.
molecules with no atoms can be written, converted to strings
entries and crystals can be created with no underlying atoms
translating molecules no longer raise an exception if there are siteless atoms.
Major new features¶
there is now an experimental interface to protein cavities. See
ccdc.cavity
.there is now a histogram class,
ccdc.utilities.Histogram
Molecule¶
ccdc.molecule.Molecule
now provides a method to calculate partial charges for organic molecules.ccdc.molecule.Atom
has a property, partial_charge, to get or set the partial charge of an atom. All partial charges of a molecule will be reset if an atom’s formal charge is changed.
Crystal¶
ccdc.crystal.Crystal
now allows access to the molecule of the asymmetric unit, through the propertyccdc.crystal.Crystal.asymmetric_unit_molecule
.
Minor new features¶
ccdc.molecule.Atom.residue_label
now allows access to residue labels where these have been set for a molecule.
1.0.0¶
Major new features¶
updated for CSDS 2016
there is now an API for docking ligands into proteins, using GOLD. This is currently available only to collaborators.
ccdc.molecule.Molecule
can now determine intramolecular hydrogen bonds and close contacts.ccdc.molecule.Atom.is_chiral
andccdc.molecule.Atom.chirality
have been extensively revised to give more accurate determination of R/S chirality including the determination of para-chiral centres (whose chirality is determined solely by the chirality of other atoms). Note that structures with pi-bonds will not support the determination of chirality.ccdc.descriptors.MolecularDescriptors
has new methods to define geometric objects from atom and ring coordinates.ccdc.descriptors.GeometricDescriptors
is new and provides methods to define vectors and planes from points, and to calculate geometric relationships between them. See Molecular geometry for details.
Minor new features¶
Entry¶
ccdc.entry.Entry.cross_references
gives a tuple ofccdc.entry.Entry.CrossReference
instances. These provide cross-references between entries of the CSD.a
ccdc.io.EntryReader
of a mol2 format entry will now extract SDFile-like tags from the Mol2Comments and place them in an attributes dictionary. The EntryWriter will write these attributes.a
ccdc.io.EntryReader
of a mol2 format entry will now extract Mol2 format atom sets and place them in a dictionary attributeccdc.entry.Entry.atom_sets
where found. The EntryWriter will write atom sets if the above attribute is set.
Crystal¶
ccdc.crystal.Crystal.molecule
is now writable. A molecule may be extracted, edited and replaced in the crystal.
Molecule¶
ccdc.molecule.Atom.sybyl_type
gives the Sybyl atom type.ccdc.molecule.Bond.sybyl_type
gives the Sybyl bond type.ccdc.molecule.Atom.vdw_radius
gives the Van der Waals radius of the atom.ccdc.molecule.Molecule.from_string()
now auto-detects the file format of the string argument. The same is true ofccdc.crystal.Crystal.from_string()
andccdc.entry.Entry.from_string()
.
Search¶
search filters provided by
ccdc.search.Search.Settings
are now applied toccdc.search.TextNumericSearch
,ccdc.search.SimilaritySearch
andccdc.search.ReducedCellSearch
searches.the
ccdc.search.Search.Settings.no_errors
attribute is now compatible with that used in ConQuest.the
ccdc.search.Search.Settings.no_ions
attribute has been provided.there is a new
ccdc.search.SubstructureSearch.Screen
which can be used to speed up substructure searches in multi-molecule Mol2 or SDF format files. See substructure-screens for details.similarly there is a new
ccdc.search.SimilaritySearch.Screen
for use when performing multiple similarity searches on a reader.
IO¶
GCD files may now use an arbitrary database as the source of entries. Use the form io.EntryReader(gcd_file, source_database). This will also work with lists of identifiers.
0.7.0¶
Deprecations¶
The property
ccdc.entry.jds_deposition_number
is deprecated. This is a historical journal deposition number and has since been superseded by CCDC numbers. The methodccdc.search.TextNumericSearch.add_jds_deposition_number()
is similarly deprecated.
Major new features¶
There is a new class,
ccdc.descriptors.MolecularDescriptors.MaximumCommonSubstructure
which may be used to calculate the maximum common substructure of twoccdc.molecule.Molecule
instances.
Minor new features¶
Entry¶
ccdc.entry.Entry.remarks
gives access to editorial comments on a database entry.ccdc.entry.Entry.pressure
gives access to the experimental pressure of a crystallisation, where known.ccdc.entry.Entry.is_powder_study
indicates whether the experimental determination was performed in a powder study
Crystal¶
The reduced cell of a crystal is now available as
ccdc.crystal.Crystal.reduced_cell
. The value is an instance ofccdc.crystal.Crystal.ReducedCell
.
IO¶
res format (SHELX) files may now be read and written through the standard io classes.
Search¶
There is a method for writing ConQuest to Mercury interchange files using
ccdc.search.SubstructureSearch.SubstructureHitList.write_c2m_file()
. This allows substructure search results to be visualised in the data analysis module of Mercury.A substructure search hit has a new method,
ccdc.search.SubstructureSearch.SubstructureHit.match_symmetry_operators()
which will return the symmetry operators applied to atoms to perform the match.There is a new method,
ccdc.search.Search.Settings.test()
which will determine whether anccdc.entry.Entry
,ccdc.crystal.Crystal
orccdc.molecule.Molecule
satisfies the requirements of the Settings class.ccdc.search.Search.Settings.no_disorder
now may take any of three values: None (or anything which evaluates to False) to indicate no filtering of any disordered structures; ‘all’ to indicate filtering of structures with any disordered atoms; ‘Non-hydrogen’ or any string apart from ‘all’ to indicate filtering of structures with heavy atom disorder. This last is compatible with the ConQuest ‘no disorder’ selector.
GeometryAnalyser¶
ccdc.conformer.GeometryAnalyser.Analysis.generalised
now reports whether generalisation was needed to find enough observations.
Screener¶
The CSD field based ligand screener, within the
ccdc.screening
module, in this release has undergone further development and results will differ those generated from version 0.6.The score threshold and the cluster radius used to generate the fitting points from the grids may be defined through
ccdc.screening.Screener.Settings.fitting_points_threshold
andccdc.screening.Screener.Settings.fitting_points_cluster_radius
, respectively.During the search the conformer selection can be biased towards the top ones in the supplied list of conformers according to
ccdc.screening.Screener.Settings.bias_conformer_selection
Examples¶
maximum_common_substructure.py shows a similarity search followed by maximum common substructure search.
filter_csd.py shows how an iteration over the entries of the CSD can omit entries on a number of criteria.
simple_report.py shows how python’s format() method may be used to write HTML reports on a CSD entry.
0.6.0¶
Backwards incompatible changes¶
Previously molecules constructed from crystals or entries read from the CSD would contain disordered atoms, even where CCDC editorial staff were able to resolve the disorder. This is no longer the case. Instead the properties
ccdc.entry.Entry.molecule
andccdc.crystal.Crystal.molecule
will suppress disordered atoms. The propertiesccdc.entry.Entry.disordered_molecule
andccdc.crystal.Crystal.disordered_molecule
may be used to retrieve the disordered atoms.The default file format for
ccdc.io.MoleculeWriter
,ccdc.io.CrystalWriter
andccdc.io.EntryWriter
has been changed from ‘aser’ to ‘mol2’, in cases where no file suffix or explicit format has been specified. This is more intuitive when writing to sys.stdout.The deprecated modules
ccdc.mogul
andccdc.isostar
are removed.ccdc.conformer.GeometryAnalyser.Analysis
no longer support z-score where the analysis type is ‘torsion’ or ‘ring’. It is a meaningless statistic for these distributions. Instead the value None is returned.
Deprecations¶
The properties
ccdc.conformer.GeometryAnalyser.Settings.GeometrySettings.usual_density_threshold
andccdc.conformer.GeometryAnalyser.Settings.GeometrySettings.usual_zscore_threshold
have been deprecated in favour of the more descriptiveccdc.conformer.GeometryAnalyser.Settings.GeometrySettings.local_density_threshold
andccdc.conformer.GeometryAnalyser.Settings.GeometrySettings.zscore_threshold
. The former pair will be removed in the next release.
Major new features¶
Substructure searches now support a set of filters to control acceptable results, for example, only organic structures, structures with an R-factor less than an arbitrary limit, or a set of unacceptable elements. See Substructure searching for examples and
ccdc.search.Search.Settings
for details.Crystal packing similarities may now be calculated using
ccdc.crystal.PackingSimilarity
. See Crystal packing similarity for examples. Feature under development - currently available only to associated collaborators.ccdc.molecule.Molecule
now has an editing API, allowing the construction and mutation of molecules. See Editing molecules for examples.ccdc.molecule.Molecule
now supports ring and conjugated bond analysis. See RingsAdded the
ccdc.screening
module for CSD-driven field-based ligand screening. See Field-based virtual screening. Feature under development - currently available only to associated collaborators.
Minor new features¶
Geometry Analyser¶
ccdc.conformer.GeometryAnalyser
will now analyse the geometries of molecules, bonds, angles and torsions of atoms with no 3D information. It will not be able to analyse rings with no 3D information.ccdc.conformer.GeometryAnalyser.fragment_identifier()
may be used to extract a unique identifier for a particular type of fragment.ccdc.conformer.GeometryAnalyser.Settings.GeometrySettings
now has properties to inspect and control the precise nature of the classification of an observation as unusual.
Diagrams¶
ccdc.diagram.DiagramGenerator
will now generate images as SVG or PIL images.
Search¶
ccdc.search.TextNumericSearch
has a new property, queries, which will give a human-readable representation of the queries added to the search instance.
Entry¶
ccdc.entry.Entry
has the property radiation_source to express the experimental radiation probe used in the determination of the crystal.ccdc.entry.Entry
has the property is_polymeric to allow filtering of the CSD on polymeric structures.ccdc.entry.Entry
andccdc.crystal.Crystal
may now be compared for equality (based on its identifier) and hashed, allowing use as a key in a dictionary or set.
Molecule¶
ccdc.molecule.Molecule
can now assign formal charges to atoms based on a correct bond-typing and protonation of the molecule.There is a new method,
ccdc.molecule.Molecule.kekulize()
which will convert aromatic bonds to alternating single and double bonds.ccdc.molecule.Molecule
now has the propertyccdc.molecule.Molecule.is_polymeric
to reflect whether the molecule contains polymeric bonds.ccdc.molecule.Molecule
now has methodsccdc.molecule.Molecule.atom()
andccdc.molecule.Molecule.bond()
to allow access to atoms and bonds by atom labels.ccdc.molecule.Molecule
now has convenience propertiesccdc.molecule.Molecule.heavy_atoms
andccdc.molecule.Molecule.is_3d
to provide a list of the heavy atoms of the molecule, and to determine whether the molecule’s heavy atoms have 3d coordinates.ccdc.molecule.Atom
now has a property, ‘fractional_coordinates’ to provide coordinates relative to the molecule’s underlying crystal’s unit cell.ccdc.io
now supports reading CSD SQLite databases by file names with suffix ‘.sqlite’ccdc.io
now supports reading and writing ‘.mol’ files as an alternative suffix to ‘.sdf’ccdc.io
reader and writer classes now report the location of their files through __str__ and __repr__ methods.ccdc.molecule.Atom
now has attributesbonds
denoting the bonds to this atom, andneighbours
denoting the atoms to which the atom is bonded.ccdc.molecule.Bond
now supports equality and hashing so may be put into a set or used as a dictionary key.ccdc.molecule.Atom
now has attributeschirality
to return the R/S chirality flag for the atom andis_chiral
returning a bool.
Crystal¶
ccdc.crystal.Crystal
now has aspacegroup_number_and_setting
attribute to provide details of the crystal’s space group.ccdc.crystal.Crystal
has a new method to calculate a packing shell of a given number of molecules.ccdc.crystal.Crystal
now reports its symmetry operations as a tuple of strings.ccdc.crystal.Crystal
will report rotational and translational components of its symmetry operators.ccdc.crystal.Crystal
now allows the generation of molecules generated by the crystal’s symmetry operations.
0.5.0¶
Backwards incompatible changes¶
The
add_refcode
function has been replaced byccdc.search.TextNumericSearch.add_identifier()
. Furthermore this function now only matches the current identifier of an entry. The previous behaviour, which also tried to find matches using any previous identifiers can be accessed using theccdc.search.TextNumericSearch.add_all_identifiers()
function.
Deprecations¶
The
ccdc.mogul
module has been deprecated. Please use theccdc.conformer.GeometryAnalyser
class instead.The
ccdc.isostar
module has been deprecated. Please use theccdc.interaction
module instead.
Major new features¶
Updated for CSDS 2015
Ability to search through and work with multiple and in-house ASER databases Working with multiple databases
Ability to highlight atom selections in 2D diagrams; see Highlighting atom selections in diagrams
Ability to access the CSD curated diagram when generating images of CSD entries; see Accessing diagrams from CSD entries
It is now possible to construct a molecule from scratch; see Building molecules from scratch
It is now possible to generate powder patterns and to calculate powder pattern similarities; see Powder patterns
It is now possible to perform reduced cell searches; see Reduced cell searching
Entries without any 3D information are no longer ignored
Minor new features¶
CIF (Crystallographic Information File) format is now supported by all the
ccdc.io
writers.ccdc.molecule.Molecule
has several shortest path functions:It is now possible to create searches using the XML format generated by the WebCSD Java sketcher
Additions to
ccdc.search.TextNumericSearch
ccdc.search.TextNumericSearch.add_all_identifiers()
checks both the current and any previous identifiers of an entry for a matchNew
start_of_word
added as an option to themode
argument, which matches start of any word in a searched stringOld
start
option of themode
argument will now only match the start of the searched stringAdded
ignore_non_alpha_num
argument
Additions to the
ccdc.entry.Entry
ccdc.entry.Entry.diagram_image()
(curated 2D diagram image)
Bug fixes¶
ccdc.entry.Entry.chemical_name
andccdc.entry.Entry.synonyms
now return non-ascii characters as Unicode
0.4.0¶
Major new features¶
Access to the CCDC conformer generator and molecular minimiser. See the
ccdc.conformer
module. Feature under development - currently available only to associated collaborators.Access to the CCDC diagram generation functionality. See the
ccdc.diagram
module.Mogul analysis of individual fragments:
ccdc.mogul.Mogul.analyse_bond()
ccdc.mogul.Mogul.analyse_angle()
ccdc.mogul.Mogul.analyse_torsion()
ccdc.mogul.Mogul.analyse_ring()
The entire CSD Python API is now unicode compatible
Minor new features¶
Some tuple data now represented using the
namedtuple
collectionFunctions for reading from and writing to strings added for entries and crystals
Function for reading in a Connser substructure search from a string
It is now also possible to write out and read in
ccdc.entry.Entry
attributes as SDF tags to and from Mol2 files. The attributes read in are dynamically added to a dictionary attribute namedattributes
.
Bug fixes¶
Fixed a bug which meant that the
ccdc.mogul.MogulResult.histogram()
function was not returning correct data.
0.3.1¶
Backwards incompatible changes¶
Renaming of
Query
classes in theccdc.search
module toSearch
classesccdc.search.TextNumericSearch
supersedesTextNumericQuery
ccdc.search.SimilaritySearch
supersedesSimilarityQuery
ccdc.search.SubstructureSearch
supersedesSubstructureQuery
Renaming of
max_hits
argument tomax_hit_structures
in theccdc.search.TextNumericSearch.search()
,ccdc.search.SimilaritySearch.search()
andccdc.search.SubstructureSearch()
functionsThe argument signature of the
ccdc.crystal.Crystal.molecular_shell()
function has been updated. It now takes a tuple nameddistance_range
that contains the minimum and maximum values as opposed to the two explicitly named argumentsrange_min
andrange_max
.
Major new features¶
Support for 64-bit Python on Linux
ccdc.search.SubstructureSearch
has expanded functionalityAbility to measure distances, angles and torsion angles in hit structures
Ability to constrain distances, angles and torsion angles in hit structures
It now provides the ability to add more than one substructure, which can be used to set up inter-molecular contact searches
A number of IsoStar classes have been implemented. See
ccdc.isostar
for details.
Minor new features¶
The
ccdc.io.EntryReader
class now supports the reading of CIF format files.The
ccdc.entry.Entry
class contains a dictionary-like member, ‘attributes’, which will contain CIF data members when the entry comes from a CIF database.ccdc.crystal.Crystal
has new propertiesccdc.descriptors.MolecularDescriptors
has new static methodsccdc.molecule.Molecule
: has new functionalityA new property,
ccdc.molecule.Molecule.formula
A new function
ccdc.molecule.Molecule.to_string()
A new static method
ccdc.molecule.Molecule.from_string()
The latter two allow simple conversions between a molecule and a string representation.
ccdc.search.SMARTSSubstructure
may now take an extended SMARTS string containing an integer label on an atom prefixed by a colon. These labels may be used to specify measurements to be made on hit results.ccdc.utilities
has a new class,ccdc.utilities.FileLogger
which supports the context manager protocol, and will allow temporary redirection of messages.
Bug fixes¶
There is a much larger number of open ASER database instances provided, and a memory leak of open ASER database instances has been fixed.
ccdc.search.ConnserSubstructure
: will raise an exception for a missing or empty file name parameter.