Skip to content

[General]: CodeEntropy fails for gas-phase MD simulations without periodic boundary conditions (PBC) #446

Description

@HafizSaqibAli

Hi CodeEntropy developers,

I am trying to use CodeEntropy to calculate configurational entropy for a small molecule simulated using molecular dynamics (MD) in the gas phase with AMBER. Since this is a gas-phase simulation, I am not using periodic boundary conditions (PBC).

However, CodeEntropy fails during the initial trajectory processing with the following error:

AttributeError: 'NoneType' object has no attribute 'copy'

The traceback points to CodeEntropy/trajectory/mda.py, inside the merge_forces() method, where the code attempts to extract trajectory dimensions:

dimensions = self._extract_timeseries(
select_atom, kind="dimensions"
)

Within _extract_timeseries(), the code attempts to execute:

values.append(universe.dimensions.copy())

For a non-periodic gas-phase trajectory, universe.dimensions is None, so this operation raises an AttributeError.

Additional Information

I would expect CodeEntropy to support non-periodic trajectories. Gas-phase MD simulations of isolated small molecules are a useful application, particularly for calculating molecular configurational entropy and investigating its relationship with properties such as solubility.

Activity

  1. harryswift01 commented on Oct 9, 2026

    @harryswift01
    Member

    Hi CodeEntropy developers,

    I am trying to use CodeEntropy to calculate configurational entropy for a small molecule simulated using molecular dynamics (MD) in the gas phase with AMBER. Since this is a gas-phase simulation, I am not using periodic boundary conditions (PBC).

    However, CodeEntropy fails during the initial trajectory processing with the following error:

    AttributeError: 'NoneType' object has no attribute 'copy'

    The traceback points to CodeEntropy/trajectory/mda.py, inside the merge_forces() method, where the code attempts to extract trajectory dimensions:

    dimensions = self._extract_timeseries( select_atom, kind="dimensions" )

    Within _extract_timeseries(), the code attempts to execute:

    values.append(universe.dimensions.copy())

    For a non-periodic gas-phase trajectory, universe.dimensions is None, so this operation raises an AttributeError.

    Additional Information

    I would expect CodeEntropy to support non-periodic trajectories. Gas-phase MD simulations of isolated small molecules are a useful application, particularly for calculating molecular configurational entropy and investigating its relationship with properties such as solubility.

    Hi @HafizSaqibAli, thanks for bringing this to our attention. I am happy to take a look into this for you now.

  2. self-assigned this
    on Oct 9, 2026
  3. added theissue type on Oct 9, 2026
  4. added this to the 2.5.0 milestone on Oct 9, 2026
  5. harryswift01 commented on Oct 9, 2026

    @harryswift01
    Member

    Hi @HafizSaqibAli , thanks again for bringing this to our attention. We have now shipped a new release of CodeEntropy, v2.5.0, which allows calculations on trajectories with no PBC. We tested it on your gas-phase system and it now runs without the AttributeError.

    You can update with either:

    pip install --upgrade CodeEntropy
    

    or

    conda install -c conda-forge -c ccpbiosim codeentropy=2.5.0
    

    Please let us know if you run into anything else. I'll close this issue for now, and feel free to reopen it if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfeature requestNew feature or request

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions